Merge pull request #45372 from Firepal/prepass-nightmares

This commit is contained in:
Rémi Verschelde 2022-02-11 15:19:26 +01:00 committed by GitHub
commit d0b446c6d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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