|
@@ -2235,24 +2235,16 @@ void fragment_shader(in SceneData scene_data) {
|
|
}
|
|
}
|
|
|
|
|
|
#ifdef USE_SHADOW_TO_OPACITY
|
|
#ifdef USE_SHADOW_TO_OPACITY
|
|
|
|
+#ifndef MODE_RENDER_DEPTH
|
|
alpha = min(alpha, clamp(length(ambient_light), 0.0, 1.0));
|
|
alpha = min(alpha, clamp(length(ambient_light), 0.0, 1.0));
|
|
|
|
|
|
#if defined(ALPHA_SCISSOR_USED)
|
|
#if defined(ALPHA_SCISSOR_USED)
|
|
if (alpha < alpha_scissor) {
|
|
if (alpha < alpha_scissor) {
|
|
discard;
|
|
discard;
|
|
}
|
|
}
|
|
-#else
|
|
|
|
-#ifdef MODE_RENDER_DEPTH
|
|
|
|
-#ifdef USE_OPAQUE_PREPASS
|
|
|
|
-
|
|
|
|
- if (alpha < scene_data.opaque_prepass_threshold) {
|
|
|
|
- discard;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
-#endif // USE_OPAQUE_PREPASS
|
|
|
|
-#endif // MODE_RENDER_DEPTH
|
|
|
|
#endif // ALPHA_SCISSOR_USED
|
|
#endif // ALPHA_SCISSOR_USED
|
|
|
|
|
|
|
|
+#endif // !MODE_RENDER_DEPTH
|
|
#endif // USE_SHADOW_TO_OPACITY
|
|
#endif // USE_SHADOW_TO_OPACITY
|
|
|
|
|
|
#endif //!defined(MODE_RENDER_DEPTH) && !defined(MODE_UNSHADED)
|
|
#endif //!defined(MODE_RENDER_DEPTH) && !defined(MODE_UNSHADED)
|