5db6705889
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@14755 178a84e3-b1eb-0310-8ba1-8eac791a3b58
21 lines
413 B
GLSL
21 lines
413 B
GLSL
uniform sampler2D diffuse_and_spec;
|
|
uniform sampler2D ambient_occlusion;
|
|
uniform vec3 ambient;
|
|
//uniform sampler2D spectex;
|
|
|
|
void main()
|
|
{
|
|
vec2 texc = gl_TexCoord[0].xy;
|
|
|
|
vec4 col = texture2D(diffuse_and_spec, texc);
|
|
float ao = texture2D(ambient_occlusion, texc).x;
|
|
|
|
col.xyz += ao * ambient;
|
|
float spec = col.a - 0.05;
|
|
//spec *= specular.a;
|
|
col.xyz += spec * col.xyz;
|
|
col.a = 1.0;
|
|
|
|
gl_FragColor = col;
|
|
}
|