30 lines
639 B
V Shell
Raw Normal View History

2023-10-07 22:18:20 -04:00
#include "/lib/util.glsl"
#include "/lib/res_params.glsl"
2023-01-12 15:00:14 -05:00
2023-10-07 22:18:20 -04:00
varying vec2 texcoord;
flat varying float tempOffsets;
uniform sampler2D colortex4;
uniform int frameCounter;
uniform int framemod8;
const vec2[8] offsets = vec2[8](vec2(1./8.,-3./8.),
vec2(-1.,3.)/8.,
vec2(5.0,1.)/8.,
vec2(-3,-5.)/8.,
vec2(-5.,5.)/8.,
vec2(-7.,-1.)/8.,
vec2(3,7.)/8.,
vec2(7.,-7.)/8.);
2023-01-12 15:00:14 -05:00
void main() {
2023-10-07 22:18:20 -04:00
2023-01-12 15:00:14 -05:00
gl_Position = ftransform();
2023-10-07 22:18:20 -04:00
texcoord = gl_MultiTexCoord0.xy;
tempOffsets = HaltonSeq2(frameCounter%10000);
#ifdef TAA_UPSCALING
gl_Position.xy = (gl_Position.xy*0.5+0.5)*RENDER_SCALE*2.0-1.0;
#endif
2023-01-12 15:00:14 -05:00
}