diff --git a/src/pipelines/render/render.wgsl b/src/pipelines/render/render.wgsl index 8cde5bf..aef8c28 100644 --- a/src/pipelines/render/render.wgsl +++ b/src/pipelines/render/render.wgsl @@ -20,11 +20,11 @@ fn fragment(@location(0) uv: vec2) -> @location(0) vec4 { let speciesBStrength = clamp(pow(traces.g, settings.clarity), 0, 1); let brushStrength = traces.a; + let agentColor = settings.speciesColorA * speciesAStrength + settings.speciesColorB * speciesBStrength; + let agentStrength = speciesAStrength + speciesBStrength; let rgbColor = sqrt( - settings.speciesColorA * speciesAStrength + - settings.speciesColorB * speciesBStrength + - settings.brushColor * brushStrength + mix(agentColor, settings.brushColor * brushStrength, clamp(brushStrength - agentStrength, 0, 1)) ); return vec4(backgroundColor - rgbColor, 1); } diff --git a/src/settings.ts b/src/settings.ts index c14b5ba..17eb480 100644 --- a/src/settings.ts +++ b/src/settings.ts @@ -36,7 +36,7 @@ export const settings: GameLoopSettings & diffusionRateTrails: 0.4, // inverse decayRateTrails: 0.9, // inverse diffusionRateBrush: 4, // inverse - decayRateBrush: 0.99, // inverse + decayRateBrush: 0.995, // inverse brushColor: palette.blue, speciesColorA: palette.yellow,