Fixed shader examples
This commit is contained in:
parent
0f2fb0e2f6
commit
0e826d8dec
2 changed files with 10 additions and 10 deletions
|
@ -6,15 +6,15 @@ 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;
|
||||
vec4 pixel = texture2D(texture, gl_TexCoord[0].xy) * 1.0 +
|
||||
texture2D(texture, gl_TexCoord[0].xy - offx) * 2.0 +
|
||||
texture2D(texture, gl_TexCoord[0].xy + offx) * 2.0 +
|
||||
texture2D(texture, gl_TexCoord[0].xy - offy) * 2.0 +
|
||||
texture2D(texture, gl_TexCoord[0].xy + offy) * 2.0 +
|
||||
texture2D(texture, gl_TexCoord[0].xy - offx - offy) * 1.0 +
|
||||
texture2D(texture, gl_TexCoord[0].xy - offx + offy) * 1.0 +
|
||||
texture2D(texture, gl_TexCoord[0].xy + offx - offy) * 1.0 +
|
||||
texture2D(texture, gl_TexCoord[0].xy + offx + offy) * 1.0;
|
||||
|
||||
gl_FragColor = gl_Color * (pixel / 13.0);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue