diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-11-18 16:44:36 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-18 16:44:36 +0100 |
commit | 4f10d47f19f40e6cf1d85e9462b5417991dbced2 (patch) | |
tree | 696f2a89afd69f87158d214c3fe3492612926723 | |
parent | ab813531556dfce4177b5bedec866c23fadbd612 (diff) | |
parent | 14b06fc2076257c9511cc8b301e8a67e35002d09 (diff) |
Merge pull request #33693 from clayjohn/GLES2-fix_negative_lights_popping
Fix negative light flickering
-rw-r--r-- | drivers/gles2/rasterizer_scene_gles2.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/gles2/rasterizer_scene_gles2.cpp b/drivers/gles2/rasterizer_scene_gles2.cpp index 6bcda62e7f..1deecbf3cc 100644 --- a/drivers/gles2/rasterizer_scene_gles2.cpp +++ b/drivers/gles2/rasterizer_scene_gles2.cpp @@ -2342,9 +2342,7 @@ void RasterizerSceneGLES2::_render_render_list(RenderList::Element **p_elements, if (accum_pass) { //accum pass force pass blend_mode = RasterizerStorageGLES2::Shader::Spatial::BLEND_MODE_ADD; - if (rebind_light && light && light->light_ptr->negative) { - glBlendEquation(GL_FUNC_REVERSE_SUBTRACT); - glBlendFunc(GL_SRC_ALPHA, GL_ONE); + if (light && light->light_ptr->negative) { blend_mode = RasterizerStorageGLES2::Shader::Spatial::BLEND_MODE_SUB; } } |