mirror of
https://github.com/edubart/otclient.git
synced 2025-10-14 03:24:55 +02:00
motion blur for fun
This commit is contained in:
@@ -4,25 +4,7 @@ uniform float time; // time in seconds since shader linkage
|
||||
uniform sampler2D texture; // map texture
|
||||
varying vec2 textureCoords; // map texture coords
|
||||
|
||||
/*
|
||||
void main()
|
||||
{
|
||||
gl_FragColor = texture2D(texture, textureCoords) * color * opacity;
|
||||
}
|
||||
*/
|
||||
void main()
|
||||
{
|
||||
vec4 sum = vec4(0);
|
||||
vec2 texcoord = textureCoords;
|
||||
int j;
|
||||
int i;
|
||||
|
||||
for( i= -4 ;i < 4; i++)
|
||||
{
|
||||
for (j = -4; j < 4; j++)
|
||||
{
|
||||
sum += texture2D(texture, texcoord + vec2(j, i)*0.0005) * 0.008;
|
||||
}
|
||||
}
|
||||
gl_FragColor = texture2D(texture, textureCoords) * color * opacity + sum;
|
||||
}
|
||||
|
Reference in New Issue
Block a user