diff --git a/sample/particles/main.ts b/sample/particles/main.ts index afe308ae..ee1f9d18 100644 --- a/sample/particles/main.ts +++ b/sample/particles/main.ts @@ -327,7 +327,7 @@ const simulationParams = { const simulationUBOBufferSize = 1 * 4 + // deltaTime 1 * 4 + // brightnessFactor - 3 * 4 + // padding + 2 * 4 + // padding 4 * 4 + // seed 0; const simulationUBOBuffer = device.createBuffer({ @@ -411,7 +411,6 @@ function frame() { simulationParams.simulate ? simulationParams.deltaTime : 0.0, simulationParams.brightnessFactor, 0.0, - 0.0, 0.0, // padding Math.random() * 100, Math.random() * 100, // seed.xy diff --git a/sample/particles/particle.wgsl b/sample/particles/particle.wgsl index c3bcd771..5b9575f7 100644 --- a/sample/particles/particle.wgsl +++ b/sample/particles/particle.wgsl @@ -5,8 +5,8 @@ var rand_seed : vec2f; fn init_rand(invocation_id : u32, seed : vec4f) { rand_seed = seed.xz; - rand_seed = fract(rand_seed * cos(35.456+f32(invocation_id) * seed.yw * 0.01f)); - rand_seed = fract(rand_seed * cos(41.235+f32(invocation_id) * seed.xw * 0.01f)); + rand_seed = fract(rand_seed * cos(35.456+f32(invocation_id) * seed.yw)); + rand_seed = fract(rand_seed * cos(41.235+f32(invocation_id) * seed.xw)); } fn rand() -> f32 {