2023-07-07 13:56:38 +01:00
|
|
|
#include "/lib/settings.glsl"
|
2023-01-12 15:28:19 -05:00
|
|
|
|
2024-02-10 18:10:46 -05:00
|
|
|
flat varying vec3 dailyWeatherParams0;
|
|
|
|
flat varying vec3 dailyWeatherParams1;
|
2023-07-25 22:48:08 -04:00
|
|
|
flat varying vec3 averageSkyCol;
|
2023-01-12 15:00:14 -05:00
|
|
|
flat varying vec3 sunColor;
|
2024-03-12 17:16:30 -04:00
|
|
|
// flat varying vec3 moonColor;
|
2023-01-12 15:00:14 -05:00
|
|
|
|
2023-06-26 00:33:31 -04:00
|
|
|
|
|
|
|
flat varying float tempOffsets;
|
2023-04-16 16:18:26 -04:00
|
|
|
flat varying vec3 WsunVec;
|
|
|
|
uniform mat4 gbufferModelViewInverse;
|
|
|
|
uniform vec3 sunPosition;
|
|
|
|
uniform float sunElevation;
|
2023-01-12 15:00:14 -05:00
|
|
|
|
|
|
|
uniform sampler2D colortex4;
|
|
|
|
uniform int frameCounter;
|
2023-10-14 23:34:52 -04:00
|
|
|
uniform float frameTimeCounter;
|
2023-06-26 00:33:31 -04:00
|
|
|
|
2023-01-12 15:00:14 -05:00
|
|
|
#include "/lib/util.glsl"
|
|
|
|
#include "/lib/res_params.glsl"
|
2023-06-26 00:33:31 -04:00
|
|
|
|
2023-10-07 22:18:20 -04:00
|
|
|
#include "/lib/Shadow_Params.glsl"
|
2023-01-12 15:00:14 -05:00
|
|
|
|
2023-10-07 22:18:20 -04:00
|
|
|
void main() {
|
2023-01-12 15:00:14 -05:00
|
|
|
|
|
|
|
gl_Position = ftransform();
|
|
|
|
gl_Position.xy = (gl_Position.xy*0.5+0.5)*clamp(CLOUDS_QUALITY+0.01,0.0,1.0)*2.0-1.0;
|
2023-06-26 00:33:31 -04:00
|
|
|
|
2024-02-10 18:10:46 -05:00
|
|
|
dailyWeatherParams0 = texelFetch2D(colortex4,ivec2(1,1),0).rgb/150.0;
|
|
|
|
dailyWeatherParams1 = texelFetch2D(colortex4,ivec2(2,1),0).rgb/150.0;
|
|
|
|
|
2023-07-25 22:48:08 -04:00
|
|
|
averageSkyCol = texelFetch2D(colortex4,ivec2(1,37),0).rgb;
|
2023-06-26 00:33:31 -04:00
|
|
|
sunColor = texelFetch2D(colortex4,ivec2(6,37),0).rgb;
|
2024-03-12 17:16:30 -04:00
|
|
|
// moonColor = texelFetch2D(colortex4,ivec2(13,37),0).rgb;
|
|
|
|
|
|
|
|
// sunColor = texelFetch2D(colortex4,ivec2(8,37),0).rgb;
|
|
|
|
// moonColor = texelFetch2D(colortex4,ivec2(9,37),0).rgb;
|
|
|
|
|
2023-06-26 00:33:31 -04:00
|
|
|
|
2024-03-12 17:16:30 -04:00
|
|
|
WsunVec = normalize(mat3(gbufferModelViewInverse) * sunPosition) * (float(sunElevation > 1e-5)*2.0-1.0);
|
2023-10-07 22:18:20 -04:00
|
|
|
// WsunVec = normalize(LightDir);
|
2023-06-26 00:33:31 -04:00
|
|
|
|
2023-10-07 22:18:20 -04:00
|
|
|
tempOffsets = HaltonSeq2(frameCounter%10000);
|
|
|
|
#ifdef TAA_UPSCALING
|
|
|
|
gl_Position.xy = (gl_Position.xy*0.5+0.5)*RENDER_SCALE*2.0-1.0;
|
|
|
|
#endif
|
|
|
|
}
|