|
@@ -684,7 +684,7 @@ void RasterizerSceneGLES3::_setup_sky(const RenderDataGLES3 *p_render_data, cons
|
|
}
|
|
}
|
|
|
|
|
|
glBindBufferBase(GL_UNIFORM_BUFFER, SKY_DIRECTIONAL_LIGHT_UNIFORM_LOCATION, sky_globals.directional_light_buffer);
|
|
glBindBufferBase(GL_UNIFORM_BUFFER, SKY_DIRECTIONAL_LIGHT_UNIFORM_LOCATION, sky_globals.directional_light_buffer);
|
|
- if (shader_data->uses_light) {
|
|
|
|
|
|
+ if (shader_data->uses_light || (environment_get_fog_enabled(p_render_data->environment) && environment_get_fog_sun_scatter(p_render_data->environment) > 0.001)) {
|
|
sky_globals.directional_light_count = 0;
|
|
sky_globals.directional_light_count = 0;
|
|
for (int i = 0; i < (int)p_lights.size(); i++) {
|
|
for (int i = 0; i < (int)p_lights.size(); i++) {
|
|
GLES3::LightInstance *li = GLES3::LightStorage::get_singleton()->get_light_instance(p_lights[i]);
|
|
GLES3::LightInstance *li = GLES3::LightStorage::get_singleton()->get_light_instance(p_lights[i]);
|