Implemented missing opaque prepass render mode, fixes #9452

This commit is contained in:
Juan Linietsky 2017-08-20 21:25:18 -03:00
parent 35d5724519
commit 0bdbe370bf

View File

@ -2309,6 +2309,16 @@ void RasterizerSceneGLES3::_add_geometry_with_material(RasterizerStorageGLES3::G
e->sort_key |= SORT_KEY_VERTEX_LIT_FLAG;
}
if (!shadow && has_alpha && p_material->shader->spatial.depth_draw_mode == RasterizerStorageGLES3::Shader::Spatial::DEPTH_DRAW_ALPHA_PREPASS) {
//depth prepass for alpha
RenderList::Element *eo = render_list.add_element();
eo->instance = e->instance;
eo->geometry = e->geometry;
eo->material = e->material;
eo->sort_key = e->sort_key;
}
}
void RasterizerSceneGLES3::_draw_sky(RasterizerStorageGLES3::Sky *p_sky, const CameraMatrix &p_projection, const Transform &p_transform, bool p_vflip, float p_scale, float p_energy) {