소스 검색

Changed ambient term to influence also texture in Phong / normal map materials.

This feels more intuitive, otherwise ambiently lit textured surfaces look weird.
alteredq 14 년 전
부모
커밋
7355c2b68b
5개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 0 0
      build/Three.js
  2. 0 0
      build/custom/ThreeExtras.js
  3. 0 0
      build/custom/ThreeWebGL.js
  4. 1 1
      src/extras/ShaderUtils.js
  5. 1 1
      src/renderers/WebGLShaders.js

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
build/Three.js


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
build/custom/ThreeExtras.js


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
build/custom/ThreeWebGL.js


+ 1 - 1
src/extras/ShaderUtils.js

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

+ 1 - 1
src/renderers/WebGLShaders.js

@@ -439,7 +439,7 @@ THREE.ShaderChunk = {
 
 		"#endif",
 
-		"gl_FragColor.xyz = gl_FragColor.xyz * totalDiffuse + totalSpecular + ambientLightColor * ambient;"
+		"gl_FragColor.xyz = gl_FragColor.xyz * ( totalDiffuse + ambientLightColor * ambient ) + totalSpecular;"
 
 	].join("\n"),
 

이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.