Skip to content

Commit

Permalink
Merge pull request #208 from StarArawn/shader-fix
Browse files Browse the repository at this point in the history
Make sure view uniform matches the struct on the CPU side.
  • Loading branch information
StarArawn authored Aug 6, 2022
2 parents d4ff5ef + 0dacf0e commit 673764e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/render/shaders/tilemap-atlas.wgsl
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
struct View {
view_proj: mat4x4<f32>,
inverse_view_proj: mat4x4<f32>,
view: mat4x4<f32>,
inverse_view: mat4x4<f32>,
projection: mat4x4<f32>,
inverse_projection: mat4x4<f32>,
world_position: vec3<f32>,
width: f32,
height: f32,
};
@group(0) @binding(0)
var<uniform> view: View;
Expand Down
6 changes: 6 additions & 0 deletions src/render/shaders/tilemap.wgsl
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
struct View {
view_proj: mat4x4<f32>,
inverse_view_proj: mat4x4<f32>,
view: mat4x4<f32>,
inverse_view: mat4x4<f32>,
projection: mat4x4<f32>,
inverse_projection: mat4x4<f32>,
world_position: vec3<f32>,
width: f32,
height: f32,
};
@group(0) @binding(0)
var<uniform> view: View;
Expand Down

0 comments on commit 673764e

Please sign in to comment.