From 0dacf0e9cbd25b0a8a224074e8c88145e5ce815a Mon Sep 17 00:00:00 2001 From: StarToaster Date: Sat, 6 Aug 2022 09:26:45 -0400 Subject: [PATCH] Make sure view uniform matches the struct on the CPU side. --- src/render/shaders/tilemap-atlas.wgsl | 6 ++++++ src/render/shaders/tilemap.wgsl | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/src/render/shaders/tilemap-atlas.wgsl b/src/render/shaders/tilemap-atlas.wgsl index 9486a985..ec7722bb 100644 --- a/src/render/shaders/tilemap-atlas.wgsl +++ b/src/render/shaders/tilemap-atlas.wgsl @@ -1,7 +1,13 @@ struct View { view_proj: mat4x4, + inverse_view_proj: mat4x4, + view: mat4x4, + inverse_view: mat4x4, projection: mat4x4, + inverse_projection: mat4x4, world_position: vec3, + width: f32, + height: f32, }; @group(0) @binding(0) var view: View; diff --git a/src/render/shaders/tilemap.wgsl b/src/render/shaders/tilemap.wgsl index efecbc10..b6a75ad8 100644 --- a/src/render/shaders/tilemap.wgsl +++ b/src/render/shaders/tilemap.wgsl @@ -1,7 +1,13 @@ struct View { view_proj: mat4x4, + inverse_view_proj: mat4x4, + view: mat4x4, + inverse_view: mat4x4, projection: mat4x4, + inverse_projection: mat4x4, world_position: vec3, + width: f32, + height: f32, }; @group(0) @binding(0) var view: View;