Ver código fonte

WebGLRenderer: MeshPhongMaterial was overriding the alpha chanel of textures.

Mr.doob 14 anos atrás
pai
commit
671b5079bb
3 arquivos alterados com 2 adições e 2 exclusões
  1. 0 0
      build/Three.js
  2. 0 0
      build/custom/ThreeWebGL.js
  3. 2 2
      src/renderers/WebGLShaders.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/ThreeWebGL.js


+ 2 - 2
src/renderers/WebGLShaders.js

@@ -408,7 +408,7 @@ THREE.ShaderChunk = {
 
 	"#endif",
 
-	"gl_FragColor = gl_FragColor * totalDiffuse + totalSpecular;"
+	"gl_FragColor.xyz = gl_FragColor.xyz * totalDiffuse.xyz + totalSpecular.xyz;"
 
 	].join("\n"),
 
@@ -1138,7 +1138,7 @@ THREE.ShaderLib = {
 
 			"void main() {",
 
-				"gl_FragColor = vec4( vLightWeighting, 1.0 );",
+				"gl_FragColor = vec4( vLightWeighting, opacity );",
 
 				THREE.ShaderChunk[ "map_fragment" ],
 				THREE.ShaderChunk[ "alphatest_fragment" ],

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