stk-code_catmod/data/shaders/lightblend.frag
vincentlj 5db6705889 Move SSAO code into renderLight in order to use a lighter rtt (8 bits instead of 32)
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@14755 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2013-12-23 17:00:27 +00:00

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;
}