Sync up bevy_sprite and bevy_ui shader View struct (#5531)
# Objective - Similar to #5512 , the `View` struct definition in the shaders in `bevy_sprite` and `bevy_ui` were out of sync with the rust-side `ViewUniform`. Only `view_proj` was being used and is the first member and as those shaders are not customisable it makes little difference in practice, unlike for `Mesh2d`. ## Solution - Sync shader `View` struct definition in `bevy_sprite` and `bevy_ui` with the correct definition that matches `ViewUniform`
This commit is contained in:
parent
12daeebf83
commit
b3ab4fc2b3
@ -1,6 +1,13 @@
|
|||||||
struct View {
|
struct View {
|
||||||
view_proj: mat4x4<f32>,
|
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>,
|
world_position: vec3<f32>,
|
||||||
|
width: f32,
|
||||||
|
height: f32,
|
||||||
};
|
};
|
||||||
@group(0) @binding(0)
|
@group(0) @binding(0)
|
||||||
var<uniform> view: View;
|
var<uniform> view: View;
|
||||||
|
@ -1,6 +1,13 @@
|
|||||||
struct View {
|
struct View {
|
||||||
view_proj: mat4x4<f32>,
|
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>,
|
world_position: vec3<f32>,
|
||||||
|
width: f32,
|
||||||
|
height: f32,
|
||||||
};
|
};
|
||||||
@group(0) @binding(0)
|
@group(0) @binding(0)
|
||||||
var<uniform> view: View;
|
var<uniform> view: View;
|
||||||
|
Loading…
Reference in New Issue
Block a user