From d8b134983a27995f23cab935e69ad38d61fb94d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois?= Date: Wed, 28 Feb 2024 16:31:13 +0100 Subject: [PATCH] not using them?? --- crates/bevy_pbr/src/render/pbr_fragment.wgsl | 11 ++++++----- crates/bevy_pbr/src/render/pbr_prepass_functions.wgsl | 11 ++++++----- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/crates/bevy_pbr/src/render/pbr_fragment.wgsl b/crates/bevy_pbr/src/render/pbr_fragment.wgsl index 61687aaed322d..d1faf7a4921bd 100644 --- a/crates/bevy_pbr/src/render/pbr_fragment.wgsl +++ b/crates/bevy_pbr/src/render/pbr_fragment.wgsl @@ -73,11 +73,12 @@ fn pbr_input_from_standard_material( let NdotV = max(dot(pbr_input.N, pbr_input.V), 0.0001); #ifdef VERTEX_UVS - let uv_transform = mat3x3( - pbr_bindings::material.uv_transform_x.x, pbr_bindings::material.uv_transform_x.y, pbr_bindings::material.uv_transform_x.z, - pbr_bindings::material.uv_transform_y.x, pbr_bindings::material.uv_transform_y.y, pbr_bindings::material.uv_transform_y.z, - pbr_bindings::material.uv_transform_z.x, pbr_bindings::material.uv_transform_z.y, pbr_bindings::material.uv_transform_z.z, - ); + // let uv_transform = mat3x3( + // pbr_bindings::material.uv_transform_x.x, pbr_bindings::material.uv_transform_x.y, pbr_bindings::material.uv_transform_x.z, + // pbr_bindings::material.uv_transform_y.x, pbr_bindings::material.uv_transform_y.y, pbr_bindings::material.uv_transform_y.z, + // pbr_bindings::material.uv_transform_z.x, pbr_bindings::material.uv_transform_z.y, pbr_bindings::material.uv_transform_z.z, + // ); + let uv_transform = mat3x3(1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0); var uv = (uv_transform * vec3(in.uv, 1.0)).xy; #ifdef VERTEX_TANGENTS diff --git a/crates/bevy_pbr/src/render/pbr_prepass_functions.wgsl b/crates/bevy_pbr/src/render/pbr_prepass_functions.wgsl index 7c470054eead1..bc44f680cfe4a 100644 --- a/crates/bevy_pbr/src/render/pbr_prepass_functions.wgsl +++ b/crates/bevy_pbr/src/render/pbr_prepass_functions.wgsl @@ -18,11 +18,12 @@ fn prepass_alpha_discard(in: VertexOutput) { var output_color: vec4 = pbr_bindings::material.base_color; #ifdef VERTEX_UVS - let uv_transform = mat3x3( - pbr_bindings::material.uv_transform_x.x, pbr_bindings::material.uv_transform_x.y, pbr_bindings::material.uv_transform_x.z, - pbr_bindings::material.uv_transform_y.x, pbr_bindings::material.uv_transform_y.y, pbr_bindings::material.uv_transform_y.z, - pbr_bindings::material.uv_transform_z.x, pbr_bindings::material.uv_transform_z.y, pbr_bindings::material.uv_transform_z.z, - ); + // let uv_transform = mat3x3( + // pbr_bindings::material.uv_transform_x.x, pbr_bindings::material.uv_transform_x.y, pbr_bindings::material.uv_transform_x.z, + // pbr_bindings::material.uv_transform_y.x, pbr_bindings::material.uv_transform_y.y, pbr_bindings::material.uv_transform_y.z, + // pbr_bindings::material.uv_transform_z.x, pbr_bindings::material.uv_transform_z.y, pbr_bindings::material.uv_transform_z.z, + // ); + let uv_transform = mat3x3(1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0); let uv = (uv_transform * vec3(in.uv, 1.0)).xy; if (pbr_bindings::material.flags & pbr_types::STANDARD_MATERIAL_FLAGS_BASE_COLOR_TEXTURE_BIT) != 0u { output_color = output_color * textureSampleBias(pbr_bindings::base_color_texture, pbr_bindings::base_color_sampler, uv, view.mip_bias);