Browse Source

Added support for metal flag to normal map shader.

alteredq 13 years ago
parent
commit
aa5918fbb8
3 changed files with 9 additions and 1 deletions
  1. 0 0
      build/Three.js
  2. 0 0
      build/custom/ThreeExtras.js
  3. 9 1
      src/extras/ShaderUtils.js

File diff suppressed because it is too large
+ 0 - 0
build/Three.js


File diff suppressed because it is too large
+ 0 - 0
build/custom/ThreeExtras.js


+ 9 - 1
src/extras/ShaderUtils.js

@@ -473,7 +473,15 @@ THREE.ShaderUtils = {
 
 					"#endif",
 
-					"gl_FragColor.xyz = gl_FragColor.xyz * ( totalDiffuse + ambientLightColor * uAmbientColor) + totalSpecular;",
+					"#ifdef METAL",
+
+						"gl_FragColor.xyz = gl_FragColor.xyz * ( totalDiffuse + ambientLightColor * uAmbientColor + totalSpecular );",
+
+					"#else",
+
+						"gl_FragColor.xyz = gl_FragColor.xyz * ( totalDiffuse + ambientLightColor * uAmbientColor ) + totalSpecular;",
+
+					"#endif",
 
 					"if ( enableReflection ) {",
 

Some files were not shown because too many files changed in this diff