source: trunk/tests/render_test/char.frag @ 161

Last change on this file since 161 was 46, checked in by epyon, 12 years ago
  • tests directory added
  • render_test added (old visual test with new syntax)
File size: 449 bytes
Line 
1#version 120
2varying vec3 f_coord;
3varying vec3 f_material;
4uniform sampler2D tex;
5 
6void main(void) {
7        float w = f_material.x;
8        float remmod  = floor( w / 16 + 0.5 );
9        float modulus = w - remmod * 16;
10
11        gl_FragColor = texture2D(tex, vec2((fract(f_coord.x) + modulus ), ( fract(f_coord.z) + remmod) )  / 16.0);
12
13//      gl_FragColor = texture2D(tex, vec2((fract(f_coord.z - f_coord.x) + modulus ), ( fract(-f_coord.y) + remmod) )  / 16.0);
14}
Note: See TracBrowser for help on using the repository browser.