2023-12-27 15:04:36 -05:00
|
|
|
#include "/lib/settings.glsl"
|
|
|
|
|
2023-08-03 00:23:29 -04:00
|
|
|
varying vec2 texcoord;
|
2023-10-07 22:18:20 -04:00
|
|
|
flat varying vec3 zMults;
|
2024-06-10 23:26:19 -04:00
|
|
|
|
|
|
|
#ifdef BorderFog
|
|
|
|
uniform sampler2D colortex4;
|
|
|
|
flat varying vec3 skyGroundColor;
|
|
|
|
#endif
|
|
|
|
|
2024-03-01 22:48:09 -05:00
|
|
|
flat varying vec3 WsunVec;
|
|
|
|
|
2023-10-07 22:18:20 -04:00
|
|
|
uniform float far;
|
|
|
|
uniform float near;
|
2024-02-16 21:28:13 -05:00
|
|
|
uniform float dhFarPlane;
|
|
|
|
uniform float dhNearPlane;
|
2023-10-25 19:17:23 -04:00
|
|
|
|
2024-03-01 22:48:09 -05:00
|
|
|
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;
|
2024-07-06 21:03:31 -04:00
|
|
|
#include "/lib/TAA_jitter.glsl"
|
|
|
|
|
2023-12-27 15:04:36 -05:00
|
|
|
|
|
|
|
|
2024-06-10 23:26:19 -04:00
|
|
|
#ifdef OVERWORLD_SHADER
|
2023-12-27 15:04:36 -05:00
|
|
|
|
2024-06-10 23:26:19 -04:00
|
|
|
#endif
|
2023-10-07 22:18:20 -04:00
|
|
|
//////////////////////////////VOID MAIN//////////////////////////////
|
|
|
|
//////////////////////////////VOID MAIN//////////////////////////////
|
|
|
|
//////////////////////////////VOID MAIN//////////////////////////////
|
|
|
|
//////////////////////////////VOID MAIN//////////////////////////////
|
|
|
|
//////////////////////////////VOID MAIN//////////////////////////////
|
2023-08-03 00:23:29 -04:00
|
|
|
|
|
|
|
void main() {
|
2023-10-25 19:17:23 -04:00
|
|
|
|
2024-06-10 23:26:19 -04:00
|
|
|
#ifdef OVERWORLD_SHADER
|
|
|
|
#ifdef BorderFog
|
|
|
|
skyGroundColor = texelFetch2D(colortex4,ivec2(1,37),0).rgb / 30.0 * Sky_Brightness;
|
|
|
|
#endif
|
|
|
|
WsunVec = normalize(mat3(gbufferModelViewInverse) * sunPosition);
|
2023-12-27 15:04:36 -05:00
|
|
|
#endif
|
2023-11-13 16:13:10 -05:00
|
|
|
|
2024-03-01 22:48:09 -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);
|
2024-02-16 21:28:13 -05:00
|
|
|
|
2023-08-03 00:23:29 -04:00
|
|
|
gl_Position = ftransform();
|
|
|
|
texcoord = gl_MultiTexCoord0.xy;
|
|
|
|
}
|