diff options
author | Juan Linietsky <reduzio@gmail.com> | 2019-01-25 09:41:25 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2019-01-25 09:41:25 -0300 |
commit | 5b5db08a51a2240dfc8452309284152af1425185 (patch) | |
tree | dc2cecad17b516ce4b3c43f003072fb27331ae37 /drivers/gles2 | |
parent | c743da100d53cbd63ecdca19fa840095f707096c (diff) |
Fix depth prepass in GLES2, closes #23321
Diffstat (limited to 'drivers/gles2')
-rw-r--r-- | drivers/gles2/rasterizer_scene_gles2.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gles2/rasterizer_scene_gles2.cpp b/drivers/gles2/rasterizer_scene_gles2.cpp index 47a4f8bc27..ae677b606d 100644 --- a/drivers/gles2/rasterizer_scene_gles2.cpp +++ b/drivers/gles2/rasterizer_scene_gles2.cpp @@ -994,6 +994,12 @@ void RasterizerSceneGLES2::_add_geometry_with_material(RasterizerStorageGLES2::G e->depth_layer = e->instance->depth_layer; 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(); if (rpsize > 0) { bool first = true; |