From 28f12b701647538c94cc7864a5bd19bcfc1c600d Mon Sep 17 00:00:00 2001 From: Nicola Papale Date: Mon, 17 Apr 2023 07:59:27 +0200 Subject: [PATCH] Fix pbr shader breaking on missing UVs --- crates/bevy_pbr/src/render/pbr.wgsl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/bevy_pbr/src/render/pbr.wgsl b/crates/bevy_pbr/src/render/pbr.wgsl index 6f36a1c59ebaf..f058a83ff8b53 100644 --- a/crates/bevy_pbr/src/render/pbr.wgsl +++ b/crates/bevy_pbr/src/render/pbr.wgsl @@ -23,8 +23,8 @@ struct FragmentInput { fn fragment(in: FragmentInput) -> @location(0) vec4 { let is_orthographic = view.projection[3].w == 1.0; let V = calculate_view(in.world_position, is_orthographic); - var uv = in.uv; #ifdef VERTEX_UVS + var uv = in.uv; #ifdef VERTEX_TANGENTS if ((material.flags & STANDARD_MATERIAL_FLAGS_DEPTH_MAP_BIT) != 0u) { let N = in.world_normal;