#version 440 in vec3 f_color; out vec4 FragColors; uniform vec3 Ka; uniform vec3 Ks; uniform float Shininess; struct LightInfo { vec4 Position; vec3 Intensity; }; uniform LightInfo Light[64]; uniform int LightCount; in vec3 fNormal; in vec3 pos; in mat3x3 tangentMatrix; in vec2 texCoord; uniform int TexCount; uniform sampler2D tex[32]; uniform sampler2D nmap; void main() { vec3 finalColor; vec3 diffuse_sum; vec3 specular_sum; vec3 ambient_sum; vec3 N = texture(nmap, texCoord).xyz; vec4 Kd = texture(tex[0], texCoord); for (int i=1; i < TexCount; i++) { vec4 new_tex = texture(tex[i], texCoord); Kd = mix(new_tex, Kd, new_tex.a); } for (int i=0; i