progs/fpglsl: couple more tests

This commit is contained in:
Keith Whitwell 2010-02-02 20:20:11 +00:00
parent d7b1610ced
commit 9f1ee5a864
2 changed files with 21 additions and 0 deletions

View File

@ -0,0 +1,15 @@
// Multi-texture fragment shader
// Brian Paul
// Composite second texture over first.
// We're assuming the 2nd texture has a meaningful alpha channel.
uniform sampler2D tex1;
uniform sampler2D tex2;
void main()
{
vec4 t1 = texture2D(tex1, gl_Color.xy);
vec4 t2 = texture2D(tex2, gl_Color.yz);
gl_FragColor = mix(t1, t2, t2.w);
}

6
progs/fpglsl/tex.glsl Normal file
View File

@ -0,0 +1,6 @@
uniform sampler2D tex1;
void main()
{
gl_FragColor = texture2D(tex1, gl_Color.xy);
}