From e0a532cb4bca50e9ae7349565c93f5388232f420 Mon Sep 17 00:00:00 2001 From: kayh <92771507+kayhhh@users.noreply.github.com> Date: Tue, 7 Nov 2023 15:04:25 -0500 Subject: [PATCH] Fix bevy_pbr shader function name (#10423) # Objective Fix a shader error that happens when using pbr morph targets. ## Solution Fix the function name in the `prepass.wgsl` shader, which is incorrectly prefixed with `morph::` (added in https://github.com/bevyengine/bevy/commit/61bad4eb5704b6859d32c69c3c45c24e77372c10#diff-97e4500f0a36bc6206d7b1490c8dd1a69459ee39dc6822eb9b2f7b160865f49fR42). This section of the shader is only enabled when using morph targets, so it seems like there are no tests / examples using it? --- crates/bevy_pbr/src/prepass/prepass.wgsl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/bevy_pbr/src/prepass/prepass.wgsl b/crates/bevy_pbr/src/prepass/prepass.wgsl index fef278324f..f9b22fa15c 100644 --- a/crates/bevy_pbr/src/prepass/prepass.wgsl +++ b/crates/bevy_pbr/src/prepass/prepass.wgsl @@ -39,7 +39,7 @@ fn vertex(vertex_no_morph: Vertex) -> VertexOutput { var out: VertexOutput; #ifdef MORPH_TARGETS - var vertex = morph::morph_vertex(vertex_no_morph); + var vertex = morph_vertex(vertex_no_morph); #else var vertex = vertex_no_morph; #endif