|
|
@ -195,6 +195,8 @@ void main(){ |
|
|
|
vec4 diffuseColor = albedo - albedo * Metallic; |
|
|
|
vec4 diffuseColor = albedo - albedo * Metallic; |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
gl_FragColor.rgb = vec3(0.0); |
|
|
|
|
|
|
|
|
|
|
|
#ifdef LIGHTMAP |
|
|
|
#ifdef LIGHTMAP |
|
|
|
vec3 lightMapColor; |
|
|
|
vec3 lightMapColor; |
|
|
|
#ifdef SEPARATE_TEXCOORD |
|
|
|
#ifdef SEPARATE_TEXCOORD |
|
|
@ -204,12 +206,14 @@ void main(){ |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#ifdef AO_MAP |
|
|
|
#ifdef AO_MAP |
|
|
|
lightMapColor.gb = lightMapColor.rr; |
|
|
|
lightMapColor.gb = lightMapColor.rr; |
|
|
|
|
|
|
|
diffuseColor.rgb *= lightMapColor; |
|
|
|
|
|
|
|
#else |
|
|
|
|
|
|
|
gl_FragColor.rgb += diffuseColor.rgb * lightMapColor; |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
specularColor.rgb *= lightMapColor; |
|
|
|
specularColor.rgb *= lightMapColor; |
|
|
|
albedo.rgb *= lightMapColor; |
|
|
|
|
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
gl_FragColor.rgb = vec3(0.0); |
|
|
|
|
|
|
|
float ndotv = max( dot( normal, viewDir ),0.0); |
|
|
|
float ndotv = max( dot( normal, viewDir ),0.0); |
|
|
|
for( int i = 0;i < NB_LIGHTS; i+=3){ |
|
|
|
for( int i = 0;i < NB_LIGHTS; i+=3){ |
|
|
|
vec4 lightColor = g_LightData[i]; |
|
|
|
vec4 lightColor = g_LightData[i]; |
|
|
|