File: ex_shader_multitex_pixel.glsl

package info (click to toggle)
allegro5 2%3A5.2.10.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 10,820 kB
  • sloc: ansic: 109,795; cpp: 12,976; objc: 4,592; java: 2,845; python: 2,595; javascript: 1,238; sh: 1,008; makefile: 40; xml: 27; pascal: 24
file content (14 lines) | stat: -rw-r--r-- 423 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/* Simple fragment shader which uses the fractional texture coordinate to
 * look up the color of the second texture (scaled down by factor 100).
 */
#ifdef GL_ES
precision mediump float;
#endif
uniform sampler2D al_tex;
uniform sampler2D tex2;
varying vec2 varying_texcoord;
void main()
{
    vec4 color = texture2D(tex2, fract(varying_texcoord * 100.0));
    gl_FragColor = color * texture2D(al_tex, varying_texcoord);
}