Skip to content

Commit

Permalink
not using them??
Browse files Browse the repository at this point in the history
  • Loading branch information
mockersf committed Feb 28, 2024
1 parent 345fc4b commit d8b1349
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
11 changes: 6 additions & 5 deletions crates/bevy_pbr/src/render/pbr_fragment.wgsl
Original file line number Diff line number Diff line change
Expand Up @@ -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<f32>(
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<f32>(
// 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<f32>(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
Expand Down
11 changes: 6 additions & 5 deletions crates/bevy_pbr/src/render/pbr_prepass_functions.wgsl
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,12 @@ fn prepass_alpha_discard(in: VertexOutput) {
var output_color: vec4<f32> = pbr_bindings::material.base_color;

#ifdef VERTEX_UVS
let uv_transform = mat3x3<f32>(
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<f32>(
// 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<f32>(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);
Expand Down

0 comments on commit d8b1349

Please sign in to comment.