Commit 0987a18
Fixed fog contribution for point and spotlights (bevyengine#21387)
# Objective
Fixes bevyengine#21327
Volumetric fog contribution was not proportional to the light intensity
for point and spotlights.
## Solution
Take into account `exposure` value for Point and Spotlights to match the
Directional light implementation.
## Testing
- Run the updated `volumetric_fog` example. You can see the volumetric
effect of point and spotlights now match the intensity of this light on
the surfaces of the room.
---
## Showcase
Point and spotlight intensities in the original `volumetric_fog` example
were too low to light up the room despite having a very strong
volumetric contribution. This update boosts the light intensity and
lowers the volumetric contribution of point and spotlights
Before this change `volumetric_fog` example with 10x light intensity for
point and spotlights:
<img width="1922" height="1126" alt="brightness_10x_on"
src="https://github.com/user-attachments/assets/7562585c-bc1b-4cbf-9d52-4ffb083d65f4"
/>
After change:
<img width="1922" height="1126" alt="brightness_10x_on_fix"
src="https://github.com/user-attachments/assets/2a17fec8-0272-4c4e-9d88-d0916027a7c5"
/>1 parent b755521 commit 0987a18
File tree
2 files changed
+7
-7
lines changed- crates/bevy_pbr/src/volumetric_fog
- examples/3d
2 files changed
+7
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
21 | | - | |
| 20 | + | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| |||
371 | 371 | | |
372 | 372 | | |
373 | 373 | | |
374 | | - | |
| 374 | + | |
375 | 375 | | |
376 | 376 | | |
377 | 377 | | |
| |||
381 | 381 | | |
382 | 382 | | |
383 | 383 | | |
384 | | - | |
| 384 | + | |
385 | 385 | | |
386 | 386 | | |
387 | 387 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
92 | | - | |
| 92 | + | |
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
| |||
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
107 | | - | |
| 107 | + | |
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
| |||
0 commit comments