1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-11-10 03:55:20 +01:00
Files
luanti/client/shaders/fxaa/opengl_vertex.glsl
2025-11-06 19:31:35 +01:00

24 lines
593 B
GLSL

uniform vec2 texelSize0;
CENTROID_ VARYING_ mediump vec2 varTexCoord;
VARYING_ vec2 sampleNW;
VARYING_ vec2 sampleNE;
VARYING_ vec2 sampleSW;
VARYING_ vec2 sampleSE;
/*
Based on
https://github.com/mattdesl/glsl-fxaa/
Portions Copyright (c) 2011 by Armin Ronacher.
*/
void main(void)
{
varTexCoord.st = inTexCoord0.st;
sampleNW = varTexCoord.st + vec2(-1.0, -1.0) * texelSize0;
sampleNE = varTexCoord.st + vec2(1.0, -1.0) * texelSize0;
sampleSW = varTexCoord.st + vec2(-1.0, 1.0) * texelSize0;
sampleSE = varTexCoord.st + vec2(1.0, 1.0) * texelSize0;
gl_Position = inVertexPosition;
}