Fix depth prepass in GLES2, closes #23321
This commit is contained in:
parent
c743da100d
commit
5b5db08a51
1 changed files with 6 additions and 0 deletions
|
@ -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;
|
||||||
|
|
Loading…
Reference in a new issue