38 lines
786 B
GLSL
38 lines
786 B
GLSL
#version 120
|
|
|
|
#define composite2
|
|
#include "shaders.settings"
|
|
|
|
varying vec4 color;
|
|
varying vec4 texcoord;
|
|
varying vec3 normal;
|
|
|
|
#ifdef TAA
|
|
uniform float viewWidth;
|
|
uniform float viewHeight;
|
|
vec2 texelSize = vec2(1.0/viewWidth,1.0/viewHeight);
|
|
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.);
|
|
#endif
|
|
|
|
void main() {
|
|
|
|
gl_Position = ftransform();
|
|
#ifdef TAA
|
|
gl_Position.xy += offsets[framemod8] * gl_Position.w*texelSize;
|
|
#endif
|
|
texcoord.xy = (gl_MultiTexCoord0).xy;
|
|
texcoord.zw = gl_MultiTexCoord1.xy/255.0;
|
|
|
|
color = gl_Color;
|
|
|
|
normal = normalize(gl_NormalMatrix * gl_Normal);
|
|
|
|
} |