Skip to content

Commit 4b0e514

Browse files
mvaligurskyMartin Valigursky
andauthored
Fix to particle alignment fix on WebGPU (#7895)
Co-authored-by: Martin Valigursky <[email protected]>
1 parent c97f835 commit 4b0e514

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/scene/shader-lib/wgsl/chunks/particle/vert/particle.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ struct RotateResult {
3939
fn rotateWithMatrix(quadXY: vec2f, pRotation: f32) -> RotateResult {
4040
let c = cos(pRotation);
4141
let s = sin(pRotation);
42-
let m = mat2x2f(vec2f(c, s), vec2f(-s, c));
42+
let m = mat2x2f(vec2f(c, -s), vec2f(s, c));
4343
return RotateResult(m * quadXY, m);
4444
}
4545

src/scene/shader-lib/wgsl/chunks/particle/vert/particle_cpu.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ struct RotateResult {
5151
fn rotateWithMatrix(quadXY: vec2f, pRotation: f32) -> RotateResult {
5252
let c = cos(pRotation);
5353
let s = sin(pRotation);
54-
let m = mat2x2f(vec2f(c, s), vec2f(-s, c));
54+
let m = mat2x2f(vec2f(c, -s), vec2f(s, c));
5555
return RotateResult(m * quadXY, m);
5656
}
5757

0 commit comments

Comments
 (0)