removed DISCARD built in variable, replaced by actual discard GLSL instruction, fixes #9677

This commit is contained in:
Juan Linietsky 2017-08-29 10:14:07 -03:00
parent e91c9b881c
commit 089cf8176e
8 changed files with 182 additions and 147 deletions

View file

@ -1559,10 +1559,6 @@ void main() {
vec2 screen_uv = gl_FragCoord.xy*screen_pixel_size;
#endif
#if defined(ENABLE_DISCARD)
bool discard_=false;
#endif
#if defined (ENABLE_SSS)
float sss_strength=0.0;
#endif
@ -1603,13 +1599,6 @@ FRAGMENT_SHADER_CODE
#endif
#if defined(ENABLE_DISCARD)
if (discard_) {
//easy to eliminate dead code
discard;
}
#endif
#ifdef ENABLE_CLIP_ALPHA
if (albedo.a<0.99) {
//used for doublepass and shadowmapping