Ver código fonte

Added support for metal flag to normal map shader.

alteredq 13 anos atrás
pai
commit
aa5918fbb8
3 arquivos alterados com 9 adições e 1 exclusões
  1. 0 0
      build/Three.js
  2. 0 0
      build/custom/ThreeExtras.js
  3. 9 1
      src/extras/ShaderUtils.js

Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 0
build/Three.js


Diferenças do arquivo suprimidas por serem muito extensas
+ 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 ) {",
 

Alguns arquivos não foram mostrados porque muitos arquivos mudaram nesse diff