Fix depth prepass in GLES2, closes #23321

This commit is contained in:
Juan Linietsky 2019-01-25 09:41:25 -03:00
parent c743da100d
commit 5b5db08a51

View file

@ -994,6 +994,12 @@ void RasterizerSceneGLES2::_add_geometry_with_material(RasterizerStorageGLES2::G
e->depth_layer = e->instance->depth_layer; e->depth_layer = e->instance->depth_layer;
e->priority = p_material->render_priority; e->priority = p_material->render_priority;
if (has_alpha && p_material->shader->spatial.depth_draw_mode == RasterizerStorageGLES2::Shader::Spatial::DEPTH_DRAW_ALPHA_PREPASS) {
//add element to opaque
RenderList::Element *eo = render_list.add_element();
*eo = *e;
}
int rpsize = e->instance->reflection_probe_instances.size(); int rpsize = e->instance->reflection_probe_instances.size();
if (rpsize > 0) { if (rpsize > 0) {
bool first = true; bool first = true;