mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
enabled ambient_light_disabled render mode flag
This commit is contained in:
parent
63c0dc690e
commit
e61d8b6f53
3 changed files with 28 additions and 13 deletions
|
|
@ -1096,9 +1096,15 @@ void main() {
|
|||
#if defined(CUSTOM_IRRADIANCE_USED)
|
||||
ambient_light = mix(ambient_light, custom_irradiance.rgb, custom_irradiance.a);
|
||||
#endif // CUSTOM_IRRADIANCE_USED
|
||||
ambient_light *= albedo.rgb;
|
||||
|
||||
ambient_light *= ao;
|
||||
{
|
||||
#if defined(AMBIENT_LIGHT_DISABLED)
|
||||
ambient_light = vec3(0.0, 0.0, 0.0);
|
||||
#else
|
||||
ambient_light *= albedo.rgb;
|
||||
ambient_light *= ao;
|
||||
#endif // AMBIENT_LIGHT_DISABLED
|
||||
}
|
||||
|
||||
// convert ao to direct light ao
|
||||
ao = mix(1.0, ao, ao_light_affect);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue