Ignore:
Timestamp:
Jul 18, 2011, 8:48:00 PM (13 years ago)
Author:
Torben Dannhauer
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • osgVisual/trunk/resources/distortion/shader.frag

    r147 r298  
    1212    blendColor = texture2D(textureBlend, gl_TexCoord[0].st);
    1313
    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;
     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;
     17
     18// Original
     19texCoord.s = (distortColor.b + mod(floor(distortColor.r * 255.5), 16.0)) / 16.0;
     20texCoord.t = 1.0 - (distortColor.g + floor(distortColor.r * 255.5 / 16.0)) / 16.0;
    1621
    1722    gl_FragColor = texture2D(textureImage, texCoord.st) * blendColor;
    1823}
     24
     25
Note: See TracChangeset for help on using the changeset viewer.