Textures work now.

Scene gets rendered and alpha-overlayed with HUD-Texture.

fixes #472 @2h
This commit is contained in:
Stefan Dresselhaus
2014-04-05 15:53:49 +02:00
parent 39341bf0f9
commit 189f9f84fa
4 changed files with 117 additions and 19 deletions

View File

@ -1,10 +1,11 @@
#version 110
uniform sampler2D tex;
uniform sampler2D tex[2];
varying vec2 texcoord;
void main()
{
gl_FragColor = texture2D(tex, texcoord);
vec4 map = texture2D(tex[0], texcoord);
vec4 hud = texture2D(tex[1], texcoord);
gl_FragColor = vec4(mix(map.rgb,hud.rgb,hud.a),1.0);
}