mirror of
https://github.com/SFML/SFML.git
synced 2024-12-11 12:39:15 +08:00
677e0343e2
git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/branches/sfml2@1273 4e206d99-4929-0410-ac5d-dfc041789085
21 lines
867 B
Plaintext
21 lines
867 B
Plaintext
uniform sampler2D texture;
|
|
uniform float offset;
|
|
|
|
void main()
|
|
{
|
|
vec2 offx = vec2(offset, 0.0);
|
|
vec2 offy = vec2(0.0, offset);
|
|
|
|
vec4 pixel = texture2D(texture, gl_TexCoord[0].xy) * 1 +
|
|
texture2D(texture, gl_TexCoord[0].xy - offx) * 2 +
|
|
texture2D(texture, gl_TexCoord[0].xy + offx) * 2 +
|
|
texture2D(texture, gl_TexCoord[0].xy - offy) * 2 +
|
|
texture2D(texture, gl_TexCoord[0].xy + offy) * 2 +
|
|
texture2D(texture, gl_TexCoord[0].xy - offx - offy) * 1 +
|
|
texture2D(texture, gl_TexCoord[0].xy - offx + offy) * 1 +
|
|
texture2D(texture, gl_TexCoord[0].xy + offx - offy) * 1 +
|
|
texture2D(texture, gl_TexCoord[0].xy + offx + offy) * 1;
|
|
|
|
gl_FragColor = gl_Color * (pixel / 13.0);
|
|
}
|