Skip to content

Commit

Permalink
Fix test_reflection
Browse files Browse the repository at this point in the history
  • Loading branch information
mtsr committed Mar 10, 2021
1 parent 55910d3 commit 5501613
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions crates/bevy_render/src/shader/shader_reflect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ fn reflect_binding(

let name = name.to_string();

if name == "Camera" {
if let Some(0usize) = name.find("Camera") {
shader_stage = BindingShaderStage::VERTEX | BindingShaderStage::FRAGMENT;
}

Expand Down Expand Up @@ -327,7 +327,6 @@ mod tests {
layout(location = 0) out vec4 v_Position;
layout(set = 0, binding = 0) uniform CameraViewProj {
mat4 ViewProj;
mat4 View;
};
layout(set = 1, binding = 0) uniform texture2D Texture;
Expand Down Expand Up @@ -382,7 +381,7 @@ mod tests {
0,
vec![BindingDescriptor {
index: 0,
name: "Camera".into(),
name: "CameraViewProj".into(),
bind_type: BindType::Uniform {
has_dynamic_offset: false,
property: UniformProperty::Struct(vec![UniformProperty::Mat4]),
Expand Down

0 comments on commit 5501613

Please sign in to comment.