Merge pull request #33693 from clayjohn/GLES2-fix_negative_lights_popping

Fix negative light flickering
This commit is contained in:
Rémi Verschelde 2019-11-18 16:44:36 +01:00 committed by GitHub
commit 4f10d47f19
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 3 deletions

View File

@ -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;
}
}