Fixed a theoretical condition where prealpha prevents lighting

(cherry picked from commit 0625f5b546)
This commit is contained in:
Bastiaan Olij 2018-09-08 11:40:06 +10:00 committed by Rémi Verschelde
parent 0da50fecbf
commit 2a66cfc2d0
1 changed files with 1 additions and 1 deletions

View File

@ -1161,7 +1161,7 @@ void RasterizerCanvasGLES3::canvas_render_items(Item *p_item_list, int p_z, cons
}
int blend_mode = shader_cache ? shader_cache->canvas_item.blend_mode : RasterizerStorageGLES3::Shader::CanvasItem::BLEND_MODE_MIX;
bool unshaded = shader_cache && (shader_cache->canvas_item.light_mode == RasterizerStorageGLES3::Shader::CanvasItem::LIGHT_MODE_UNSHADED || blend_mode != RasterizerStorageGLES3::Shader::CanvasItem::BLEND_MODE_MIX);
bool unshaded = shader_cache && (shader_cache->canvas_item.light_mode == RasterizerStorageGLES3::Shader::CanvasItem::LIGHT_MODE_UNSHADED || (blend_mode != RasterizerStorageGLES3::Shader::CanvasItem::BLEND_MODE_MIX && blend_mode != RasterizerStorageGLES3::Shader::CanvasItem::BLEND_MODE_PMALPHA));
bool reclip = false;
if (last_blend_mode != blend_mode) {