Fix shadows not casted by async hidden materials
This commit is contained in:
parent
928c488888
commit
a46da9311e
|
@ -2325,7 +2325,7 @@ void RasterizerSceneGLES3::_add_geometry_with_material(RasterizerStorageGLES3::G
|
||||||
if (has_blend_alpha || p_material->shader->spatial.uses_depth_texture || ((has_base_alpha || p_instance->cast_shadows == VS::SHADOW_CASTING_SETTING_OFF) && p_material->shader->spatial.depth_draw_mode != RasterizerStorageGLES3::Shader::Spatial::DEPTH_DRAW_ALPHA_PREPASS) || p_material->shader->spatial.depth_draw_mode == RasterizerStorageGLES3::Shader::Spatial::DEPTH_DRAW_NEVER || p_material->shader->spatial.no_depth_test) {
|
if (has_blend_alpha || p_material->shader->spatial.uses_depth_texture || ((has_base_alpha || p_instance->cast_shadows == VS::SHADOW_CASTING_SETTING_OFF) && p_material->shader->spatial.depth_draw_mode != RasterizerStorageGLES3::Shader::Spatial::DEPTH_DRAW_ALPHA_PREPASS) || p_material->shader->spatial.depth_draw_mode == RasterizerStorageGLES3::Shader::Spatial::DEPTH_DRAW_NEVER || p_material->shader->spatial.no_depth_test) {
|
||||||
return; //bye
|
return; //bye
|
||||||
}
|
}
|
||||||
if (!p_material->shader->shader->is_custom_code_ready_for_render(p_material->shader->custom_code_id)) {
|
if (!p_shadow_pass && !p_material->shader->shader->is_custom_code_ready_for_render(p_material->shader->custom_code_id)) {
|
||||||
// The shader is not guaranteed to be able to render (i.e., a not yet ready async hidden one);
|
// The shader is not guaranteed to be able to render (i.e., a not yet ready async hidden one);
|
||||||
// skip depth rendering because otherwise we risk masking out pixels that won't get written to at the actual render pass
|
// skip depth rendering because otherwise we risk masking out pixels that won't get written to at the actual render pass
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue