summaryrefslogtreecommitdiff
path: root/alligator_render/shaders/sprite.wgsl
diff options
context:
space:
mode:
authorMicha White <botahamec@outlook.com>2023-02-04 11:40:41 -0500
committerMicha White <botahamec@outlook.com>2023-02-04 11:40:41 -0500
commit7131aaa8575cab2b9fccf263ba8eeb9dcddf9c2b (patch)
tree6d98bad71cb3eb421f8b9ec7d72f97d17019c1ce /alligator_render/shaders/sprite.wgsl
parentae4ae305d03733659aaa305958d5b9968bfacbd4 (diff)
Fix shader compilation error
Diffstat (limited to 'alligator_render/shaders/sprite.wgsl')
-rw-r--r--alligator_render/shaders/sprite.wgsl4
1 files changed, 2 insertions, 2 deletions
diff --git a/alligator_render/shaders/sprite.wgsl b/alligator_render/shaders/sprite.wgsl
index 60b5773..276a8ef 100644
--- a/alligator_render/shaders/sprite.wgsl
+++ b/alligator_render/shaders/sprite.wgsl
@@ -30,8 +30,8 @@ fn vs_main(model: VertexInput, instance: InstanceInput) -> VertexOutput {
let rotation = -instance.rotation;
let a = vec2<f32>(cos(rotation), sin(rotation));
let b = vec2<f32>(-a[1], a[0]);
- let rotation = mat2x2<f32>(a, b);
- let rotated = rotation * model.position;
+ let rotation_mat = mat2x2<f32>(a, b);
+ let rotated = rotation_mat * model.position;
// scale the sprite
let scaled = rotated * instance.size;