Line | |
---|
1 | uniform sampler2D textureImage; |
---|
2 | uniform sampler2D textureDistort; |
---|
3 | uniform sampler2D textureBlend; |
---|
4 | |
---|
5 | void main() |
---|
6 | { |
---|
7 | vec4 texCoord; |
---|
8 | vec4 distortColor; |
---|
9 | vec4 blendColor; |
---|
10 | |
---|
11 | distortColor = texture2D(textureDistort, gl_TexCoord[0].st); |
---|
12 | blendColor = texture2D(textureBlend, gl_TexCoord[0].st); |
---|
13 | |
---|
14 | texCoord.s = (distortColor.b + mod(floor(distortColor.r * 255.5), 16.0)) / 16.0; |
---|
15 | texCoord.t = 1.0 - (distortColor.g + floor(distortColor.r * 255.5 / 16.0)) / 16.0; |
---|
16 | |
---|
17 | gl_FragColor = texture2D(textureImage, texCoord.st) * blendColor; |
---|
18 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.