소스 검색

update ShaderSkin to use new linearToOutputTexel function.

Ben Houston 9 년 전
부모
커밋
3c4face74e
1개의 변경된 파일4개의 추가작업 그리고 6개의 파일을 삭제
  1. 4 6
      examples/js/ShaderSkin.js

+ 4 - 6
examples/js/ShaderSkin.js

@@ -247,11 +247,9 @@ THREE.ShaderSkin = {
 
 				"outgoingLight += diffuseColor.xyz * ( totalDiffuseLight + ambientLightColor * diffuse ) + totalSpecularLight;",
 
-				THREE.ShaderChunk[ "linear_to_gamma_fragment" ],
-				THREE.ShaderChunk[ "fog_fragment" ],
-
-				"gl_FragColor = vec4( outgoingLight, diffuseColor.a );",	// TODO, this should be pre-multiplied to allow for bright highlights on very transparent objects
+				"gl_FragColor = linearToOutputTexel( vec4( outgoingLight, diffuseColor.a ) );",	// TODO, this should be pre-multiplied to allow for bright highlights on very transparent objects
 
+				THREE.ShaderChunk[ "fog_fragment" ],
 
 			"}"
 
@@ -550,10 +548,10 @@ THREE.ShaderSkin = {
 
 				"}",
 
-				THREE.ShaderChunk[ "fog_fragment" ],
-
 				"gl_FragColor = vec4( outgoingLight, diffuseColor.a );",	// TODO, this should be pre-multiplied to allow for bright highlights on very transparent objects
 
+				THREE.ShaderChunk[ "fog_fragment" ],
+
 			"}"
 
 		].join( "\n" ),