Skip to content

Commit

Permalink
with padding
Browse files Browse the repository at this point in the history
  • Loading branch information
mockersf committed Mar 19, 2024
1 parent da1dc88 commit 6cab4ef
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions crates/bevy_pbr/src/pbr_material.rs
Original file line number Diff line number Diff line change
Expand Up @@ -614,6 +614,7 @@ pub struct StandardMaterialUniform {
pub uv_transform_y_axis: Vec2,
/// The translation of the transform applied to the UVs corresponding to ATTRIBUTE_UV_0 on the mesh before sampling. Default is [0, 0].
pub uv_transform_translation: Vec2,
pub padding: Vec2,
/// Linear perceptual roughness, clamped to [0.089, 1.0] in the shader
/// Defaults to minimum of 0.089
pub roughness: f32,
Expand Down Expand Up @@ -753,6 +754,7 @@ impl AsBindGroupShaderType<StandardMaterialUniform> for StandardMaterial {
uv_transform_x_axis: self.uv_transform.matrix2.x_axis,
uv_transform_y_axis: self.uv_transform.matrix2.y_axis,
uv_transform_translation: self.uv_transform.translation,
padding: Vec2::ZERO,
}
}
}
Expand Down
1 change: 1 addition & 0 deletions crates/bevy_pbr/src/render/pbr_types.wgsl
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ struct StandardMaterial {
emissive: vec4<f32>,
attenuation_color: vec4<f32>,
uv_transform: mat3x2<f32>,
padding: vec2<f32>,
perceptual_roughness: f32,
metallic: f32,
reflectance: f32,
Expand Down

0 comments on commit 6cab4ef

Please sign in to comment.