Skip to content

Commit

Permalink
🤷
Browse files Browse the repository at this point in the history
  • Loading branch information
mockersf committed Feb 29, 2024
1 parent 7691866 commit 64e87d4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
4 changes: 2 additions & 2 deletions crates/bevy_pbr/src/render/pbr_fragment.wgsl
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ fn pbr_input_from_standard_material(

#ifdef VERTEX_UVS
let uv_transform = mat3x3<f32>(
vec3<f32>(pbr_bindings::material.uv_transform_x_axys, 0.0),
vec3<f32>(pbr_bindings::material.uv_transform_y_axys, 0.0),
vec3<f32>(pbr_bindings::material.uv_transform_xy_axys.xy, 0.0),
vec3<f32>(pbr_bindings::material.uv_transform_yy_axys.zw, 0.0),
vec3<f32>(pbr_bindings::material.uv_transform_translation, 1.0),
);
var uv = (uv_transform * vec3(in.uv, 1.0)).xy;
Expand Down
4 changes: 2 additions & 2 deletions crates/bevy_pbr/src/render/pbr_prepass_functions.wgsl
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ fn prepass_alpha_discard(in: VertexOutput) {

#ifdef VERTEX_UVS
let uv_transform = mat3x3<f32>(
vec3<f32>(pbr_bindings::material.uv_transform_x_axys, 0.0),
vec3<f32>(pbr_bindings::material.uv_transform_y_axys, 0.0),
vec3<f32>(pbr_bindings::material.uv_transform_xy_axys.xy, 0.0),
vec3<f32>(pbr_bindings::material.uv_transform_yy_axys.zw, 0.0),
vec3<f32>(pbr_bindings::material.uv_transform_translation, 1.0),
);
let uv = (uv_transform * vec3(in.uv, 1.0)).xy;
Expand Down
6 changes: 2 additions & 4 deletions crates/bevy_pbr/src/render/pbr_types.wgsl
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ struct StandardMaterial {
base_color: vec4<f32>,
emissive: vec4<f32>,
attenuation_color: vec4<f32>,
uv_transform_x_axys: vec2<f32>,
uv_transform_y_axys: vec2<f32>,
uv_transform_xy_axys: vec4<f32>,
uv_transform_translation: vec2<f32>,
perceptual_roughness: f32,
metallic: f32,
Expand Down Expand Up @@ -80,8 +79,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_x_axys = vec2<f32>(1.0, 0.0);
material.uv_transform_y_axys = vec2<f32>(0.0, 1.0);
material.uv_transform_xy_axys = vec4<f32>(1.0, 0.0, 0.0, 0.1);
material.uv_transform_translation = vec2<f32>(0.0, 0.0);

return material;
Expand Down

0 comments on commit 64e87d4

Please sign in to comment.