|
@@ -2287,19 +2287,6 @@ void RasterizerSceneGLES2::_render_render_list(RenderList::Element **p_elements,
|
|
|
prev_unshaded = unshaded;
|
|
|
}
|
|
|
|
|
|
- bool depth_prepass = false;
|
|
|
-
|
|
|
- if (!p_alpha_pass && material->shader->spatial.depth_draw_mode == RasterizerStorageGLES2::Shader::Spatial::DEPTH_DRAW_ALPHA_PREPASS) {
|
|
|
- depth_prepass = true;
|
|
|
- }
|
|
|
-
|
|
|
- if (depth_prepass != prev_depth_prepass) {
|
|
|
-
|
|
|
- state.scene_shader.set_conditional(SceneShaderGLES2::USE_DEPTH_PREPASS, depth_prepass);
|
|
|
- prev_depth_prepass = depth_prepass;
|
|
|
- rebind = true;
|
|
|
- }
|
|
|
-
|
|
|
bool base_pass = !accum_pass && !unshaded; //conditions for a base pass
|
|
|
|
|
|
if (base_pass != prev_base_pass) {
|
|
@@ -2434,6 +2421,19 @@ void RasterizerSceneGLES2::_render_render_list(RenderList::Element **p_elements,
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ bool depth_prepass = false;
|
|
|
+
|
|
|
+ if (!p_alpha_pass && material->shader->spatial.depth_draw_mode == RasterizerStorageGLES2::Shader::Spatial::DEPTH_DRAW_ALPHA_PREPASS) {
|
|
|
+ depth_prepass = true;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (depth_prepass != prev_depth_prepass) {
|
|
|
+
|
|
|
+ state.scene_shader.set_conditional(SceneShaderGLES2::USE_DEPTH_PREPASS, depth_prepass);
|
|
|
+ prev_depth_prepass = depth_prepass;
|
|
|
+ rebind = true;
|
|
|
+ }
|
|
|
+
|
|
|
bool instancing = e->instance->base_type == VS::INSTANCE_MULTIMESH;
|
|
|
|
|
|
if (instancing != prev_instancing) {
|