optimized blob exhibit
[laserbrain_demo] / sdr / lightmap-tex.p.glsl
1 /* vi: set ft=glsl */
2 uniform sampler2D texmap;
3 uniform sampler2D lightmap;
4
5 void main()
6 {
7         vec3 texel = texture2D(texmap, gl_TexCoord[0].st).rgb;
8         vec3 lumel = texture2D(lightmap, gl_TexCoord[1].st).rgb;
9
10         vec3 diffuse = lumel * texel * 1.8;
11
12         vec3 ambient = gl_LightModel.ambient.rgb * texel;
13         gl_FragColor.rgb = ambient + diffuse;
14         gl_FragColor.a = gl_FrontMaterial.diffuse.a;
15 }