mirror of
https://github.com/godotengine/godot.git
synced 2025-02-17 22:43:01 +08:00
Do not enable light if atlas size is 0, closes #9335
This commit is contained in:
parent
5410662720
commit
4c000a05f6
@ -4282,7 +4282,7 @@ void RasterizerSceneGLES3::render_scene(const Transform &p_cam_transform, const
|
||||
if (i > 0) {
|
||||
glEnable(GL_BLEND);
|
||||
}
|
||||
_setup_directional_light(i, p_cam_transform.affine_inverse(), shadow_atlas != NULL);
|
||||
_setup_directional_light(i, p_cam_transform.affine_inverse(), shadow_atlas != NULL && shadow_atlas->size > 0);
|
||||
_render_list(render_list.elements, render_list.element_count, p_cam_transform, p_cam_projection, env_radiance_tex, false, false, false, i > 0, shadow_atlas != NULL);
|
||||
}
|
||||
}
|
||||
@ -4345,7 +4345,7 @@ void RasterizerSceneGLES3::render_scene(const Transform &p_cam_transform, const
|
||||
} else {
|
||||
for (int i = 0; i < state.directional_light_count; i++) {
|
||||
directional_light = directional_lights[i];
|
||||
_setup_directional_light(i, p_cam_transform.affine_inverse(), shadow_atlas != NULL);
|
||||
_setup_directional_light(i, p_cam_transform.affine_inverse(), shadow_atlas != NULL && shadow_atlas->size > 0);
|
||||
_render_list(&render_list.elements[render_list.max_elements - render_list.alpha_element_count], render_list.alpha_element_count, p_cam_transform, p_cam_projection, env_radiance_tex, false, true, false, i > 0, shadow_atlas != NULL);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user