diff --git a/crates/bevy_pbr/src/pbr_material.rs b/crates/bevy_pbr/src/pbr_material.rs index 5ad7080231d93..2fe57aead898a 100644 --- a/crates/bevy_pbr/src/pbr_material.rs +++ b/crates/bevy_pbr/src/pbr_material.rs @@ -596,8 +596,8 @@ pub struct StandardMaterialUniform { pub emissive: Vec4, /// Color white light takes after travelling through the attenuation distance underneath the material surface pub attenuation_color: Vec4, - /// The transform applied to the UVs corresponding to ATTRIBUTE_UV_0 on the mesh before sampling. Default is identity. - pub uv_transform: Mat3, + // /// The transform applied to the UVs corresponding to ATTRIBUTE_UV_0 on the mesh before sampling. Default is identity. + // pub uv_transform: Mat3, /// Linear perceptual roughness, clamped to [0.089, 1.0] in the shader /// Defaults to minimum of 0.089 pub roughness: f32, @@ -732,7 +732,7 @@ impl AsBindGroupShaderType for StandardMaterial { lightmap_exposure: self.lightmap_exposure, max_relief_mapping_search_steps: self.parallax_mapping_method.max_steps(), deferred_lighting_pass_id: self.deferred_lighting_pass_id as u32, - uv_transform: self.uv_transform.into(), + // uv_transform: self.uv_transform.into(), } } } diff --git a/crates/bevy_pbr/src/render/pbr_fragment.wgsl b/crates/bevy_pbr/src/render/pbr_fragment.wgsl index 07b37c3b46962..b2f220526b324 100644 --- a/crates/bevy_pbr/src/render/pbr_fragment.wgsl +++ b/crates/bevy_pbr/src/render/pbr_fragment.wgsl @@ -73,7 +73,7 @@ fn pbr_input_from_standard_material( let NdotV = max(dot(pbr_input.N, pbr_input.V), 0.0001); #ifdef VERTEX_UVS - let uv_transform = pbr_bindings::material.uv_transform; + 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 edf08a5cb2909..12e5104f33bfe 100644 --- a/crates/bevy_pbr/src/render/pbr_prepass_functions.wgsl +++ b/crates/bevy_pbr/src/render/pbr_prepass_functions.wgsl @@ -18,7 +18,7 @@ fn prepass_alpha_discard(in: VertexOutput) { var output_color: vec4 = pbr_bindings::material.base_color; #ifdef VERTEX_UVS - let uv_transform = pbr_bindings::material.uv_transform; + 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); diff --git a/crates/bevy_pbr/src/render/pbr_types.wgsl b/crates/bevy_pbr/src/render/pbr_types.wgsl index 5ecc6e893e0e2..1bc3c718fe4fa 100644 --- a/crates/bevy_pbr/src/render/pbr_types.wgsl +++ b/crates/bevy_pbr/src/render/pbr_types.wgsl @@ -6,7 +6,7 @@ struct StandardMaterial { base_color: vec4, emissive: vec4, attenuation_color: vec4, - uv_transform: mat3x3, + // uv_transform: mat3x3, perceptual_roughness: f32, metallic: f32, reflectance: f32, @@ -78,7 +78,7 @@ fn standard_material_new() -> StandardMaterial { material.max_relief_mapping_search_steps = 5u; material.deferred_lighting_pass_id = 1u; // scale 1, translation 0, rotation 0 - material.uv_transform = mat3x3(1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0); + // material.uv_transform = mat3x3(1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0); return material; }