2014-01-04 19:08:00 -05:00
|
|
|
#version 130
|
2013-12-24 15:51:53 -05:00
|
|
|
uniform sampler2D diffuse;
|
|
|
|
uniform sampler2D specular;
|
2013-12-23 12:00:27 -05:00
|
|
|
uniform sampler2D ambient_occlusion;
|
2013-12-25 15:19:18 -05:00
|
|
|
uniform sampler2D specular_map;
|
2013-11-30 16:33:06 -05:00
|
|
|
uniform vec3 ambient;
|
|
|
|
|
2014-01-08 18:11:10 -05:00
|
|
|
in vec2 uv;
|
|
|
|
|
2013-11-30 16:33:06 -05:00
|
|
|
void main()
|
|
|
|
{
|
2014-01-08 18:11:10 -05:00
|
|
|
vec2 texc = uv;
|
2013-11-30 16:33:06 -05:00
|
|
|
|
2013-12-24 15:51:53 -05:00
|
|
|
vec3 diffuse = texture2D(diffuse, texc).xyz;
|
|
|
|
vec3 spec = texture2D(specular, texc).xyz;
|
2013-12-25 15:19:18 -05:00
|
|
|
float specmap = texture2D(specular_map, texc).x;
|
2013-12-23 12:00:27 -05:00
|
|
|
float ao = texture2D(ambient_occlusion, texc).x;
|
2013-11-30 16:33:06 -05:00
|
|
|
|
2013-12-25 15:19:18 -05:00
|
|
|
gl_FragColor = vec4(diffuse + spec * specmap + ao * ambient, 1.0);
|
2013-11-30 16:33:06 -05:00
|
|
|
}
|