1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

Add a per-light volumetric fog energy property

Per-light energy gives more control to the user on the final result of
volumetric fog. Specific lights can be fully excluded from volumetric fog
by setting their volumetric fog energy to 0, which improves performance
slightly. This can also be used to prevent short-lived dynamic effects
from poorly interacting with volumetric fog, as it's updated over several
frames by default unless temporal reprojection is disabled.

Volumetric fog shadows now obey Light3D's Shadow Opacity property as well.

The shadow fog fade property was removed as it had little visible impact
on the final scene's rendering.
This commit is contained in:
Hugo Locurcio
2021-07-09 10:28:33 +02:00
parent e27b61d291
commit 09bedcead4
14 changed files with 100 additions and 106 deletions

View File

@@ -618,7 +618,7 @@ private:
float soft_shadow_size;
float soft_shadow_scale;
uint32_t mask;
float shadow_volumetric_fog_fade;
float volumetric_fog_energy;
uint32_t bake_mode;
float projector_rect[4];
};
@@ -638,7 +638,7 @@ private:
float fade_to;
uint32_t pad[2];
uint32_t bake_mode;
float shadow_volumetric_fog_fade;
float volumetric_fog_energy;
float shadow_bias[4];
float shadow_normal_bias[4];
float shadow_transmittance_bias[4];