diff options
author | Alan Hourihane <alanh@tungstengraphics.com> | 2008-11-05 11:59:12 +0000 |
---|---|---|
committer | Alan Hourihane <alanh@tungstengraphics.com> | 2008-11-05 11:59:12 +0000 |
commit | 2382dc8aff9983da9ef1be03de38d4ab82105b19 (patch) | |
tree | 9a468d991fa58d0bb41244ee343410fd7dabdcf8 /progs/glsl/multitex.frag | |
parent | 9e1f0e173e5619d2ce95a74158803d94b3d6ff8a (diff) | |
parent | aab429c8df228271786890691a43786baf091b37 (diff) |
Merge commit 'origin/master' into gallium-0.2
Diffstat (limited to 'progs/glsl/multitex.frag')
-rw-r--r-- | progs/glsl/multitex.frag | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/progs/glsl/multitex.frag b/progs/glsl/multitex.frag index a2633ceba7..61ef95f3fe 100644 --- a/progs/glsl/multitex.frag +++ b/progs/glsl/multitex.frag @@ -7,9 +7,29 @@ uniform sampler2D tex1; uniform sampler2D tex2; -void main() +vec4 sample(sampler2D t, vec2 coord) +{ + return texture2D(t, coord); +} + +void main0() { vec4 t1 = texture2D(tex1, gl_TexCoord[0].xy); - vec4 t2 = texture2D(tex2, gl_TexCoord[1].xy); + //vec4 t1 = sample(tex1, gl_TexCoord[0].xy); + //vec4 t2 = texture2D(tex2, gl_TexCoord[1].xy); + vec4 t2 = sample(tex2, gl_TexCoord[0].xy); gl_FragColor = mix(t1, t2, t2.w); } + +void main() +{ + vec4 t1 = sample(tex1, gl_TexCoord[0].xy); + vec4 t2 = sample(tex2, gl_TexCoord[0].xy); + gl_FragColor = t1 + t2; +} +/* + 0: MOV SAMPLER[0].x, SAMPLER[0]; + 1: MOV TEMP[1], INPUT[4]; + 2: TEX OUTPUT[0], TEMP[1], texture[0], 2D; + 3: END +*/ |