mirror of
https://github.com/bevyengine/bevy
synced 2024-11-22 04:33:37 +00:00
Remove remaining camerapos bindings (#1708)
Fixes #1706 @JeanMertz already solved it. I just ran all examples and tests.
This commit is contained in:
parent
42924d2227
commit
cd8025d0a7
7 changed files with 5 additions and 15 deletions
|
@ -321,7 +321,6 @@ mod tests {
|
|||
layout(location = 0) out vec4 v_Position;
|
||||
layout(set = 0, binding = 0) uniform CameraViewProj {
|
||||
mat4 ViewProj;
|
||||
vec4 CameraPos;
|
||||
};
|
||||
layout(set = 1, binding = 0) uniform texture2D Texture;
|
||||
|
||||
|
@ -379,10 +378,7 @@ mod tests {
|
|||
name: "CameraViewProj".into(),
|
||||
bind_type: BindType::Uniform {
|
||||
has_dynamic_offset: false,
|
||||
property: UniformProperty::Struct(vec![
|
||||
UniformProperty::Mat4,
|
||||
UniformProperty::Vec4
|
||||
]),
|
||||
property: UniformProperty::Struct(vec![UniformProperty::Mat4]),
|
||||
},
|
||||
shader_stage: BindingShaderStage::VERTEX,
|
||||
}]
|
||||
|
|
|
@ -4,7 +4,6 @@ layout(location = 0) in vec3 Vertex_Position;
|
|||
|
||||
layout(set = 0, binding = 0) uniform CameraViewProj {
|
||||
mat4 ViewProj;
|
||||
vec4 CameraPos;
|
||||
};
|
||||
|
||||
layout(set = 1, binding = 0) uniform Transform {
|
||||
|
|
|
@ -8,7 +8,6 @@ layout(location = 0) out vec2 v_Uv;
|
|||
|
||||
layout(set = 0, binding = 0) uniform CameraViewProj {
|
||||
mat4 ViewProj;
|
||||
vec4 CameraPos;
|
||||
};
|
||||
|
||||
layout(set = 2, binding = 0) uniform Transform {
|
||||
|
@ -26,7 +25,7 @@ void main() {
|
|||
|
||||
uint x_flip_bit = 1; // The X flip bit
|
||||
uint y_flip_bit = 2; // The Y flip bit
|
||||
|
||||
|
||||
// Note: Here we subtract f32::EPSILON from the flipped UV coord. This is due to reasons unknown
|
||||
// to me (@zicklag ) that causes the uv's to be slightly offset and causes over/under running of
|
||||
// the sprite UV sampling which is visible when resizing the screen.
|
||||
|
@ -42,4 +41,4 @@ void main() {
|
|||
|
||||
vec3 position = Vertex_Position * vec3(size, 1.0);
|
||||
gl_Position = ViewProj * Model * vec4(position, 1.0);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,7 +9,6 @@ layout(location = 1) out vec4 v_Color;
|
|||
|
||||
layout(set = 0, binding = 0) uniform CameraViewProj {
|
||||
mat4 ViewProj;
|
||||
vec4 CameraPos;
|
||||
};
|
||||
|
||||
// TODO: merge dimensions into "sprites" buffer when that is supported in the Uniforms derive abstraction
|
||||
|
@ -83,4 +82,4 @@ void main() {
|
|||
|
||||
v_Color = color;
|
||||
gl_Position = ViewProj * SpriteTransform * vec4(vertex_position, 1.0);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,7 +8,6 @@ layout(location = 0) out vec2 v_Uv;
|
|||
|
||||
layout(set = 0, binding = 0) uniform CameraViewProj {
|
||||
mat4 ViewProj;
|
||||
vec4 CameraPos;
|
||||
};
|
||||
|
||||
layout(set = 1, binding = 0) uniform Transform {
|
||||
|
@ -22,4 +21,4 @@ void main() {
|
|||
v_Uv = Vertex_Uv;
|
||||
vec3 position = Vertex_Position * vec3(NodeSize, 0.0);
|
||||
gl_Position = ViewProj * Object * vec4(position, 1.0);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -31,7 +31,6 @@ const VERTEX_SHADER: &str = r#"
|
|||
layout(location = 0) in vec3 Vertex_Position;
|
||||
layout(set = 0, binding = 0) uniform CameraViewProj {
|
||||
mat4 ViewProj;
|
||||
vec4 CameraPos;
|
||||
};
|
||||
layout(set = 1, binding = 0) uniform Transform {
|
||||
mat4 Model;
|
||||
|
|
|
@ -39,7 +39,6 @@ const VERTEX_SHADER: &str = r#"
|
|||
layout(location = 0) in vec3 Vertex_Position;
|
||||
layout(set = 0, binding = 0) uniform CameraViewProj {
|
||||
mat4 ViewProj;
|
||||
vec4 CameraPos;
|
||||
};
|
||||
layout(set = 1, binding = 0) uniform Transform {
|
||||
mat4 Model;
|
||||
|
|
Loading…
Reference in a new issue