Rev | Line | |
---|
[147] | 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 | |
---|
[298] | 14 | // modified |
---|
| 15 | // texCoord.s = (distortColor.b / 255.0 + mod(distortColor.r , 16.0)) / 16.0; |
---|
| 16 | // texCoord.t = 1.0 - (distortColor.g / 255.0 + (distortColor.r / 16.0)) / 16.0; |
---|
[147] | 17 | |
---|
[298] | 18 | // Original |
---|
| 19 | texCoord.s = (distortColor.b + mod(floor(distortColor.r * 255.5), 16.0)) / 16.0; |
---|
| 20 | texCoord.t = 1.0 - (distortColor.g + floor(distortColor.r * 255.5 / 16.0)) / 16.0; |
---|
| 21 | |
---|
[147] | 22 | gl_FragColor = texture2D(textureImage, texCoord.st) * blendColor; |
---|
| 23 | } |
---|
[298] | 24 | |
---|
| 25 | |
---|
Note: See
TracBrowser
for help on using the repository browser.