"#ifdef DIFFUSE_TEXTURE_BLEND\n"
" color = texture2D(uTextureDiffuse0, vTexCoord) * uTextureDiffuseWeight +\n"
" texture2D(uTextureDiffuse1, vTexCoord) * (1.0 - uTextureDiffuseWeight);\n"
+ " color *= uMaterialDiffuse;\n"
"#else\n"
"#ifdef DIFFUSE_TEXTURE\n"
- " color = texture2D(uTextureDiffuse0, vTexCoord);\n"
+ " color = texture2D(uTextureDiffuse0, vTexCoord) * uMaterialDiffuse;\n"
"#else\n"
" color = uMaterialDiffuse;\n"
"#endif //DIFFUSE_TEXTURE\n"
"#ifdef DIFFUSE_TEXTURE_BLEND\n"
" color = texture2D(uTextureDiffuse0, vTexCoord) * uTextureDiffuseWeight +\n"
" texture2D(uTextureDiffuse1, vTexCoord) * (1.0 - uTextureDiffuseWeight);\n"
+ " color *= uMaterialDiffuse;\n"
"#else\n"
"#ifdef DIFFUSE_TEXTURE\n"
- " color = texture2D(uTextureDiffuse0, vTexCoord);\n"
+ " color = texture2D(uTextureDiffuse0, vTexCoord) * uMaterialDiffuse;\n"
"#else\n"
" color = uMaterialDiffuse;\n"
"#endif //DIFFUSE_TEXTURE\n"
"#ifdef SPECULAR_TEXTURE_BLEND\n"
" color = texture2D(uTextureSpecular0, vTexCoord) * uTextureSpecularWeight +\n"
" texture2D(uTextureSpecular1, vTexCoord) * (1.0 - uTextureSpecularWeight);\n"
+ " color *= uMaterialSpecular;\n"
"#else\n"
"#ifdef SPECULAR_TEXTURE\n"
- " color = texture2D(uTextureSpecular0, vTexCoord);\n"
+ " color = texture2D(uTextureSpecular0, vTexCoord) * uMaterialSpecular;\n"
"#else\n"
" color = uMaterialSpecular;\n"
"#endif //SPECULAR_TEXTURE\n"
"#ifdef AMBIENT_TEXTURE_BLEND\n"
" color = texture2D(uTextureAmbient0, vTexCoord) * uTextureAmbientWeight +\n"
" texture2D(uTextureAmbient1, vTexCoord) * (1.0 - uTextureAmbientWeight);\n"
+ " color *= uMaterialAmbient;\n"
"#else\n"
"#ifdef AMBIENT_TEXTURE\n"
- " color = texture2D(uTextureAmbient0, vTexCoord);\n"
+ " color = texture2D(uTextureAmbient0, vTexCoord) * uMaterialAmbient;\n"
"#else\n"
" color = uMaterialAmbient;\n"
"#endif //AMBIENT_TEXTURE\n"
"#ifdef EMISSION_TEXTURE_BLEND\n"
" color = texture2D(uTextureEmission0, vTexCoord) * uTextureEmissionWeight +\n"
" texture2D(uTextureEmission1, vTexCoord) * (1.0 - uTextureEmissionWeight);\n"
+ " color *= uMaterialEmission;\n"
"#else\n"
"#ifdef EMISSION_TEXTURE\n"
- " color = texture2D(uTextureEmission0, vTexCoord);\n"
+ " color = texture2D(uTextureEmission0, vTexCoord) * uMaterialEmission;\n"
"#else\n"
" color = uMaterialEmission;\n"
"#endif //EMISSION_TEXTURE\n"