Skip to content

Commit

Permalink
fix emissive value in StandardMaterial after swith to LinearRgba (bev…
Browse files Browse the repository at this point in the history
…yengine#13502)

# Objective

- bevyengine#13352 broke bloom in 3d

## Solution

- Use the correct value for `emissive` in `StandardMaterial`. It's
computed just above but unused

https://github.com/bevyengine/bevy/blob/d87505899fc6adcb1a26550e921b0f5b0c351c57/crates/bevy_pbr/src/pbr_material.rs#L975-L976

## Testing

- Run example `bloom_3d`
  • Loading branch information
mockersf authored May 25, 2024
1 parent d875058 commit 0ec6347
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/bevy_pbr/src/pbr_material.rs
Original file line number Diff line number Diff line change
Expand Up @@ -977,7 +977,7 @@ impl AsBindGroupShaderType<StandardMaterialUniform> for StandardMaterial {

StandardMaterialUniform {
base_color: LinearRgba::from(self.base_color).to_vec4(),
emissive: self.emissive.to_vec4(),
emissive,
roughness: self.perceptual_roughness,
metallic: self.metallic,
reflectance: self.reflectance,
Expand Down

0 comments on commit 0ec6347

Please sign in to comment.