ho3/resources/shaders/Frame.fragment
Vladislav Khorev d132060e19 Resurrection
2024-06-06 16:25:38 +03:00

24 lines
898 B
Plaintext

uniform sampler2D Texture;
varying vec2 texCoord;
void main()
{
float xstep = 0.5f/800.0f;
float ystep = 0.5f/600.0f;
vec4 texColor =
vec4(texture2D(Texture,texCoord).rgb,1.0) * 0.2
+ vec4(texture2D(Texture, vec2(texCoord.x+xstep, texCoord.y+ystep)).rgb,1.0) * 0.1
+ vec4(texture2D(Texture, vec2(texCoord.x-xstep, texCoord.y+ystep)).rgb,1.0) * 0.1
+ vec4(texture2D(Texture, vec2(texCoord.x-xstep, texCoord.y-ystep)).rgb,1.0) * 0.1
+ vec4(texture2D(Texture, vec2(texCoord.x+xstep, texCoord.y-ystep)).rgb,1.0) * 0.1
+ vec4(texture2D(Texture, vec2(texCoord.x, texCoord.y+2.0*ystep)).rgb,1.0) * 0.1
+ vec4(texture2D(Texture, vec2(texCoord.x, texCoord.y-2.0*ystep)).rgb,1.0) * 0.1
+ vec4(texture2D(Texture, vec2(texCoord.x-2.0*xstep, texCoord.y)).rgb,1.0) * 0.1
+ vec4(texture2D(Texture, vec2(texCoord.x+2.0*xstep, texCoord.y)).rgb,1.0) * 0.1;
gl_FragColor = texColor;
}