3 uniform sampler2D texmap;
5 uniform sampler2D lightmap;
7 uniform sampler2D mirrortex;
8 uniform vec2 mirtex_offs;
9 uniform vec2 mirtex_scale;
10 uniform float reflectivity;
15 vec3 lumel = texture2D(lightmap, gl_TexCoord[1].st).rgb;
18 vec3 texel = texture2D(texmap, gl_TexCoord[0].st).rgb;
19 vec3 ambient = gl_LightModel.ambient.rgb * texel;
20 vec3 diffuse = lumel * texel * 1.8;
22 vec3 ambient = gl_LightModel.ambient.rgb * gl_FrontMaterial.diffuse.rgb;
23 vec3 diffuse = gl_FrontMaterial.diffuse.rgb * lumel * 1.8;
27 vec3 refl = texture2D(mirrortex, (gl_FragCoord.xy + mirtex_offs) * mirtex_scale).rgb;
28 diffuse += refl * reflectivity; // just add it to diffuse until we get another source of specularity
31 gl_FragColor.rgb = ambient + diffuse;
32 gl_FragColor.a = gl_FrontMaterial.diffuse.a;