Don't use prepass threshold with alpha scissor

This commit is contained in:
Firepal 2021-01-22 20:33:27 +01:00
parent cf555f0698
commit ff55157d3f
2 changed files with 13 additions and 0 deletions

View File

@ -1695,9 +1695,13 @@ FRAGMENT_SHADER_CODE
#endif // ALPHA_SCISSOR_USED
#ifdef USE_DEPTH_PREPASS
#if !defined(ALPHA_SCISSOR_USED)
if (alpha < 0.1) {
discard;
}
#endif // not ALPHA_SCISSOR_USED
#endif // USE_DEPTH_PREPASS
#endif // !USE_SHADOW_TO_OPACITY
@ -2255,9 +2259,13 @@ FRAGMENT_SHADER_CODE
#endif // ALPHA_SCISSOR_USED
#ifdef USE_DEPTH_PREPASS
#if !defined(ALPHA_SCISSOR_USED)
if (alpha < 0.1) {
discard;
}
#endif // not ALPHA_SCISSOR_USED
#endif // USE_DEPTH_PREPASS
#endif // !USE_SHADOW_TO_OPACITY

View File

@ -1902,11 +1902,13 @@ FRAGMENT_SHADER_CODE
#endif // ALPHA_SCISSOR_USED
#ifdef USE_OPAQUE_PREPASS //ubershader-runtime
#if !defined(ALPHA_SCISSOR_USED)
if (alpha < opaque_prepass_threshold) {
discard;
}
#endif // not ALPHA_SCISSOR_USED
#endif // USE_OPAQUE_PREPASS //ubershader-runtime
#endif // !USE_SHADOW_TO_OPACITY
@ -2282,10 +2284,13 @@ FRAGMENT_SHADER_CODE
#endif // ALPHA_SCISSOR_USED
#ifdef USE_OPAQUE_PREPASS //ubershader-runtime
#if !defined(ALPHA_SCISSOR_USED)
if (alpha < opaque_prepass_threshold) {
discard;
}
#endif // not ALPHA_SCISSOR_USED
#endif // USE_OPAQUE_PREPASS //ubershader-runtime
#endif // USE_SHADOW_TO_OPACITY