Skip to content

Commit

Permalink
PBR: use attenuation instead of base_color for attenuation (#12266)
Browse files Browse the repository at this point in the history
# Objective

- Copy paste error in #12163

## Solution

- Fix it
  • Loading branch information
mockersf committed Mar 2, 2024
1 parent 5619bd0 commit 04ec105
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion crates/bevy_pbr/src/pbr_material.rs
Expand Up @@ -727,7 +727,9 @@ impl AsBindGroupShaderType<StandardMaterialUniform> for StandardMaterial {
thickness: self.thickness,
ior: self.ior,
attenuation_distance: self.attenuation_distance,
attenuation_color: LinearRgba::from(self.base_color).to_f32_array().into(),
attenuation_color: LinearRgba::from(self.attenuation_color)
.to_f32_array()
.into(),
flags: flags.bits(),
alpha_cutoff,
parallax_depth_scale: self.parallax_depth_scale,
Expand Down

0 comments on commit 04ec105

Please sign in to comment.