55 lines
1.3 KiB
V Shell
Raw Normal View History

#include "/lib/settings.glsl"
varying vec2 texcoord;
2023-10-07 22:18:20 -04:00
flat varying vec3 zMults;
#ifdef BorderFog
uniform sampler2D colortex4;
flat varying vec3 skyGroundColor;
#endif
flat varying vec3 WsunVec;
2023-10-07 22:18:20 -04:00
uniform float far;
uniform float near;
uniform float dhFarPlane;
uniform float dhNearPlane;
uniform mat4 gbufferModelViewInverse;
uniform vec3 sunPosition;
uniform float sunElevation;
2023-11-13 16:13:10 -05:00
flat varying vec2 TAA_Offset;
uniform int framemod8;
#include "/lib/TAA_jitter.glsl"
#ifdef OVERWORLD_SHADER
#endif
2023-10-07 22:18:20 -04:00
//////////////////////////////VOID MAIN//////////////////////////////
//////////////////////////////VOID MAIN//////////////////////////////
//////////////////////////////VOID MAIN//////////////////////////////
//////////////////////////////VOID MAIN//////////////////////////////
//////////////////////////////VOID MAIN//////////////////////////////
void main() {
#ifdef OVERWORLD_SHADER
#ifdef BorderFog
2024-11-15 17:54:18 -05:00
skyGroundColor = texelFetch2D(colortex4,ivec2(1,37),0).rgb / 1200.0 * Sky_Brightness;
#endif
WsunVec = normalize(mat3(gbufferModelViewInverse) * sunPosition);
#endif
2023-11-13 16:13:10 -05:00
#ifdef TAA
TAA_Offset = offsets[framemod8];
#else
TAA_Offset = vec2(0.0);
#endif
2023-10-07 22:18:20 -04:00
zMults = vec3(1.0/(far * near),far+near,far-near);
gl_Position = ftransform();
texcoord = gl_MultiTexCoord0.xy;
}