diff --git a/shaders/world0/shadow.fsh b/shaders/world0/shadow.fsh index e381200..db28204 100644 --- a/shaders/world0/shadow.fsh +++ b/shaders/world0/shadow.fsh @@ -21,6 +21,8 @@ float blueNoise(){ return fract(texelFetch2D(noisetex, ivec2(gl_FragCoord.xy)%512, 0).a + 1.0/1.6180339887 ); } +uniform int renderStage; + //////////////////////////////VOID MAIN////////////////////////////// //////////////////////////////VOID MAIN////////////////////////////// //////////////////////////////VOID MAIN////////////////////////////// @@ -51,6 +53,6 @@ void main() { // gl_FragData[0] = vec4(texture2D(tex,texcoord.xy).rgb * color.rgb, texture2DLod(tex, texcoord.xy, 0).a); #ifdef Stochastic_Transparent_Shadows - if(gl_FragData[0].a < blueNoise()) { discard; return;} + if(gl_FragData[0].a < blueNoise() && (renderStage == MC_RENDER_STAGE_TERRAIN_TRANSLUCENT || renderStage == MC_RENDER_STAGE_ENTITIES || renderStage == MC_RENDER_STAGE_BLOCK_ENTITIES)) { discard; return;} #endif } diff --git a/shaders/world0_with_aether_flag/shadow.fsh b/shaders/world0_with_aether_flag/shadow.fsh index 036816b..b407f63 100644 --- a/shaders/world0_with_aether_flag/shadow.fsh +++ b/shaders/world0_with_aether_flag/shadow.fsh @@ -8,6 +8,8 @@ varying vec2 texcoord; uniform sampler2D tex; uniform sampler2D noisetex; +uniform int renderStage; + //////////////////////////////VOID MAIN////////////////////////////// //////////////////////////////VOID MAIN////////////////////////////// //////////////////////////////VOID MAIN////////////////////////////// @@ -32,6 +34,6 @@ void main() { // gl_FragData[0] = vec4(texture2D(tex,texcoord.xy).rgb * color.rgb, texture2DLod(tex, texcoord.xy, 0).a); #ifdef Stochastic_Transparent_Shadows - if(gl_FragData[0].a < blueNoise()) { discard; return;} + if(gl_FragData[0].a < blueNoise() && (renderStage == MC_RENDER_STAGE_TERRAIN_TRANSLUCENT || renderStage == MC_RENDER_STAGE_ENTITIES || renderStage == MC_RENDER_STAGE_BLOCK_ENTITIES)) { discard; return;} #endif } diff --git a/shaders/world0_with_twilight_forest_flag/shadow.fsh b/shaders/world0_with_twilight_forest_flag/shadow.fsh index 036816b..b407f63 100644 --- a/shaders/world0_with_twilight_forest_flag/shadow.fsh +++ b/shaders/world0_with_twilight_forest_flag/shadow.fsh @@ -8,6 +8,8 @@ varying vec2 texcoord; uniform sampler2D tex; uniform sampler2D noisetex; +uniform int renderStage; + //////////////////////////////VOID MAIN////////////////////////////// //////////////////////////////VOID MAIN////////////////////////////// //////////////////////////////VOID MAIN////////////////////////////// @@ -32,6 +34,6 @@ void main() { // gl_FragData[0] = vec4(texture2D(tex,texcoord.xy).rgb * color.rgb, texture2DLod(tex, texcoord.xy, 0).a); #ifdef Stochastic_Transparent_Shadows - if(gl_FragData[0].a < blueNoise()) { discard; return;} + if(gl_FragData[0].a < blueNoise() && (renderStage == MC_RENDER_STAGE_TERRAIN_TRANSLUCENT || renderStage == MC_RENDER_STAGE_ENTITIES || renderStage == MC_RENDER_STAGE_BLOCK_ENTITIES)) { discard; return;} #endif } diff --git a/shaders/world1/shadow.fsh b/shaders/world1/shadow.fsh index 4dc850f..2108cd1 100644 --- a/shaders/world1/shadow.fsh +++ b/shaders/world1/shadow.fsh @@ -16,6 +16,8 @@ uniform sampler2D noisetex; varying float LIGHTNING; uniform float frameTimeCounter; +uniform int renderStage; + //////////////////////////////VOID MAIN////////////////////////////// @@ -40,7 +42,7 @@ void main() { // gl_FragData[0] = vec4(texture2D(tex,texcoord.xy).rgb * color.rgb, texture2DLod(tex, texcoord.xy, 0).a); #ifdef Stochastic_Transparent_Shadows - if(gl_FragData[0].a < blueNoise()) { discard; return;} + if(gl_FragData[0].a < blueNoise() && (renderStage == MC_RENDER_STAGE_TERRAIN_TRANSLUCENT || renderStage == MC_RENDER_STAGE_ENTITIES || renderStage == MC_RENDER_STAGE_BLOCK_ENTITIES)) { discard; return;} #endif #else gl_FragData[0] = vec4(0.0);