Clone of mesa.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

multitex.frag 355B

123456789101112131415
  1. // Multi-texture fragment shader
  2. // Brian Paul
  3. // Composite second texture over first.
  4. // We're assuming the 2nd texture has a meaningful alpha channel.
  5. uniform sampler2D tex1;
  6. uniform sampler2D tex2;
  7. void main()
  8. {
  9. vec4 t1 = texture2D(tex1, gl_TexCoord[0].xy);
  10. vec4 t2 = texture2D(tex2, gl_TexCoord[1].xy);
  11. gl_FragColor = mix(t1, t2, t2.w);
  12. }