This commit is contained in:
Andras Schmelczer 2023-04-29 21:18:40 +01:00
parent a3f76f5c77
commit 99e1923066
No known key found for this signature in database
GPG key ID: FC8F2C3D3D1A718C
6 changed files with 49 additions and 35 deletions

View file

@ -20,11 +20,11 @@ fn fragment(@location(0) uv: vec2<f32>) -> @location(0) vec4<f32> {
+ textureSample(trailMap, Sampler, uv + vec2<f32>(0, -1) / settings.size)
+ textureSample(trailMap, Sampler, uv + vec2<f32>(-1, 0) / settings.size)
+ textureSample(trailMap, Sampler, uv + vec2<f32>(1, 0) / settings.size)
);
) / 4;
let mixed = mix(
current,
neighbours / 4.0,
neighbours,
settings.diffusionRate
) * (1.0 - settings.decayRate);