Fix pbr shader breaking on missing UVs (#8412)
# Objective Fix #8409 Since `in` doesn't have a `uv` field when `VERTEX_UVS` is not defined, it shouldn't be accessed outside of related `#ifdef`s
This commit is contained in:
parent
396c2713a6
commit
c488b7089c
@ -23,8 +23,8 @@ struct FragmentInput {
|
|||||||
fn fragment(in: FragmentInput) -> @location(0) vec4<f32> {
|
fn fragment(in: FragmentInput) -> @location(0) vec4<f32> {
|
||||||
let is_orthographic = view.projection[3].w == 1.0;
|
let is_orthographic = view.projection[3].w == 1.0;
|
||||||
let V = calculate_view(in.world_position, is_orthographic);
|
let V = calculate_view(in.world_position, is_orthographic);
|
||||||
var uv = in.uv;
|
|
||||||
#ifdef VERTEX_UVS
|
#ifdef VERTEX_UVS
|
||||||
|
var uv = in.uv;
|
||||||
#ifdef VERTEX_TANGENTS
|
#ifdef VERTEX_TANGENTS
|
||||||
if ((material.flags & STANDARD_MATERIAL_FLAGS_DEPTH_MAP_BIT) != 0u) {
|
if ((material.flags & STANDARD_MATERIAL_FLAGS_DEPTH_MAP_BIT) != 0u) {
|
||||||
let N = in.world_normal;
|
let N = in.world_normal;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user