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