Skip to content

Commit

Permalink
improvement: Lerp light intensity for a softer fade
Browse files Browse the repository at this point in the history
  • Loading branch information
IQuick143 committed May 27, 2024
1 parent 093c271 commit d1cc6d3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/math/sampling_primitives.rs
Original file line number Diff line number Diff line change
Expand Up @@ -694,6 +694,6 @@ fn update_lights(
let saturation = (counter.0 as f32 / MAX_POINTS as f32).min(2.0);
let intensity = 40_000.0 * saturation;
for mut light in lights.iter_mut() {
light.intensity = intensity;
light.intensity = light.intensity.lerp(intensity, 0.04);
}
}

0 comments on commit d1cc6d3

Please sign in to comment.