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

Fix sky updating when DirectionalLight mode changed and shader compatibility for certain drivers

This commit is contained in:
clayjohn
2022-05-19 17:38:59 -07:00
parent 920ca62528
commit 39f1be760f
3 changed files with 6 additions and 6 deletions

View File

@@ -855,7 +855,7 @@ void RasterizerSceneGLES3::_setup_sky(Environment *p_env, RID p_render_buffers,
if (light_data_dirty) {
glBindBufferBase(GL_UNIFORM_BUFFER, SKY_DIRECTIONAL_LIGHT_UNIFORM_LOCATION, sky_globals.directional_light_buffer);
glBufferSubData(GL_UNIFORM_BUFFER, 0, sizeof(DirectionalLightData) * sky_globals.directional_light_count, sky_globals.directional_lights);
glBufferData(GL_UNIFORM_BUFFER, sizeof(DirectionalLightData) * sky_globals.max_directional_lights, sky_globals.directional_lights, GL_STREAM_DRAW);
glBindBuffer(GL_UNIFORM_BUFFER, 0);
DirectionalLightData *temp = sky_globals.last_frame_directional_lights;