From 550161380bab71c7361dac09593316a0dda6c340 Mon Sep 17 00:00:00 2001 From: Jonas Matser Date: Wed, 10 Mar 2021 23:26:02 +0100 Subject: [PATCH] Fix test_reflection --- crates/bevy_render/src/shader/shader_reflect.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/crates/bevy_render/src/shader/shader_reflect.rs b/crates/bevy_render/src/shader/shader_reflect.rs index 9c9696780dc26..47d9ac0299275 100644 --- a/crates/bevy_render/src/shader/shader_reflect.rs +++ b/crates/bevy_render/src/shader/shader_reflect.rs @@ -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; } @@ -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; @@ -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]),