stk-code_catmod/data/shaders/lightblend.frag
2014-01-19 19:31:00 +01:00

22 lines
475 B
GLSL

#version 130
uniform sampler2D diffuse;
uniform sampler2D specular;
uniform sampler2D ambient_occlusion;
uniform sampler2D specular_map;
uniform vec3 ambient;
in vec2 uv;
out vec4 FragColor;
void main()
{
vec2 texc = uv;
vec3 diffuse = texture(diffuse, texc).xyz;
vec3 spec = texture(specular, texc).xyz;
float specmap = texture(specular_map, texc).x;
float ao = texture(ambient_occlusion, texc).x;
FragColor = vec4(diffuse + spec * specmap + ao * ambient, 1.0);
}