Minor adjustments

This commit is contained in:
Andras Schmelczer 2023-05-20 13:42:24 +01:00
commit 7dbeb2127c
No known key found for this signature in database
GPG key ID: FC8F2C3D3D1A718C
6 changed files with 11 additions and 14 deletions

View file

@ -83,13 +83,13 @@ fn main(@builtin(global_invocation_id) global_id: vec3<u32>) {
nextAngle = agent.angle + rotation;
}
var trail = vec4<f32>(0, 1, 0, 0);
var trail = vec4<f32>(0, 0.1, 0, 0);
if (agent.species == 0) {
trail = vec4(0.1, 0, 0, 0);
}
let current = textureLoad(trailMapIn, vec2<i32>(nextPosition), 0);
textureStore(trailMapOut, vec2<i32>(nextPosition), vec4(trail.rgb + current.rgb, 0));
textureStore(trailMapOut, vec2<i32>(nextPosition), vec4(trail.rgb + current.rgb, current.a));
agent.position = nextPosition;
agent.angle = nextAngle;