tested proper blurring of the trail

This commit is contained in:
2025-08-02 01:36:04 +03:00
parent 83bd1bf452
commit 93ea79937b
3 changed files with 21 additions and 22 deletions

View File

@@ -18,6 +18,8 @@ layout(push_constant, std430) uniform Params {
} params;
const float SPEED = 1.0;
const float DEPOSIT = 0.5;
float random(vec2 coords) {
return fract(sin(dot(coords.xy, vec2(12.9898,78.233))) * 43758.5453);
@@ -78,7 +80,7 @@ void main() {
agent_buffer.positions[id] = pos;
agent_buffer.headings[id] = new_heading;
float new_v = current_v + 0.3;
float new_v = current_v + DEPOSIT;
if (new_v > 1.0) new_v = 1.0;
vec4 result = vec4(new_v, new_v, new_v, 1.0);