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;
|
2014-01-19 13:31:00 -05:00
|
|
|
out vec4 FragColor;
|
2014-01-08 18:11:10 -05:00
|
|
|
|
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
|
|
|
|
2014-01-19 12:53:35 -05:00
|
|
|
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;
|
2013-11-30 16:33:06 -05:00
|
|
|
|
2014-01-19 13:31:00 -05:00
|
|
|
FragColor = vec4(diffuse + spec * specmap + ao * ambient, 1.0);
|
2013-11-30 16:33:06 -05:00
|
|
|
}
|