Merge pull request #12227 from hi-ogawa/fix-depth-draw-alpha-prepass-for-shadow

Fix depth draw alpha prepass for shadow
This commit is contained in:
Rémi Verschelde 2017-10-20 12:50:30 +02:00 committed by GitHub
commit cf5eded982

View file

@ -2430,7 +2430,9 @@ void RasterizerStorageGLES3::_update_material(Material *material) {
if (material->shader && material->shader->mode == VS::SHADER_SPATIAL) {
if (!material->shader->spatial.uses_alpha && material->shader->spatial.blend_mode == Shader::Spatial::BLEND_MODE_MIX) {
Shader::Spatial spatial = material->shader->spatial;
if (spatial.blend_mode == Shader::Spatial::BLEND_MODE_MIX &&
(!spatial.uses_alpha || (spatial.uses_alpha && spatial.depth_draw_mode == Shader::Spatial::DEPTH_DRAW_ALPHA_PREPASS))) {
can_cast_shadow = true;
}