mirror of
https://github.com/Merlin1809/Eclipse-Shader.git
synced 2026-10-10 04:53:07 +08:00
38 lines
1018 B
GLSL
38 lines
1018 B
GLSL
#version 430 compatibility
|
|
|
|
#include "/lib/settings.glsl"
|
|
|
|
in vec4 color;
|
|
|
|
in vec2 texcoord;
|
|
uniform sampler2D gtexture;
|
|
uniform sampler2D noisetex;
|
|
|
|
//////////////////////////////VOID MAIN//////////////////////////////
|
|
//////////////////////////////VOID MAIN//////////////////////////////
|
|
//////////////////////////////VOID MAIN//////////////////////////////
|
|
//////////////////////////////VOID MAIN//////////////////////////////
|
|
//////////////////////////////VOID MAIN//////////////////////////////
|
|
|
|
float blueNoise(){
|
|
return fract(texelFetch(noisetex, ivec2(gl_FragCoord.xy)%512, 0).a + 1.0/1.6180339887 );
|
|
}
|
|
|
|
/* RENDERTARGETS: 0 */
|
|
|
|
void main() {
|
|
vec4 color = texture(gtexture,texcoord.xy);
|
|
vec2 lmcoord;
|
|
float ao;
|
|
vec4 overlayColor;
|
|
|
|
clrwl_computeFragment(color, color, lmcoord, ao, overlayColor);
|
|
color.rgb = mix(color.rgb, overlayColor.rgb, overlayColor.a);
|
|
|
|
gl_FragData[0] = color;
|
|
|
|
#ifdef Stochastic_Transparent_Shadows
|
|
if(gl_FragData[0].a < blueNoise()) { discard; return;}
|
|
#endif
|
|
}
|