diff options
Diffstat (limited to 'assets')
| -rw-r--r-- | assets/final/shaders/ellipse.wgsl | 2 | ||||
| -rw-r--r-- | assets/final/shaders/particle_spray_compute.wgsl | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/assets/final/shaders/ellipse.wgsl b/assets/final/shaders/ellipse.wgsl index 05dfcfc..69b2712 100644 --- a/assets/final/shaders/ellipse.wgsl +++ b/assets/final/shaders/ellipse.wgsl @@ -46,6 +46,6 @@ fn sdEllipse(p: vec2<f32>, ab: vec2<f32>) -> f32 { @fragment fn fs_main(@builtin(position) p: vec4<f32>) -> @location(0) vec4<f32> { let uv = (p.xy / uniforms.resolution - 0.5) * 2.0; let movement = vec2<f32>(sin(uniforms.time * 0.7), cos(uniforms.time * 0.5)); - let d = sdEllipse((uv * vec2<f32>(uniforms.aspect_ratio, 1.0)) - movement, vec2<f32>(0.5, 0.3) * (1.0 + uniforms.beat * 0.2)); + let d = sdEllipse((uv * vec2<f32>(uniforms.aspect_ratio, 1.0)) - movement, vec2<f32>(0.5, 0.3) * (1.0 + uniforms.beat_phase * 0.2)); return mix(vec4<f32>(0.2, 0.8, 0.4, 1.0), vec4<f32>(0.0), smoothstep(0.0, 0.01, d)); } diff --git a/assets/final/shaders/particle_spray_compute.wgsl b/assets/final/shaders/particle_spray_compute.wgsl index a4041f2..4b6e48f 100644 --- a/assets/final/shaders/particle_spray_compute.wgsl +++ b/assets/final/shaders/particle_spray_compute.wgsl @@ -29,7 +29,7 @@ fn main(@builtin(global_invocation_id) id: vec3<u32>) { p.color = vec4<f32>(hash(r + 0.1), hash(r + 0.2), 1.0, 1.0); } let new_pos = p.pos.xyz + p.vel.xyz * 0.016; - p.pos = vec4<f32>(new_pos, p.pos.w - 0.01 * (1.0 + uniforms.beat)); + p.pos = vec4<f32>(new_pos, p.pos.w - 0.01 * (1.0 + uniforms.beat_phase)); p.vel.y = p.vel.y - 0.01; particles[i] = p; } |
