Browse Source

WebGLRenderer: MeshPhongMaterial was overriding the alpha chanel of textures.

Mr.doob 14 years ago
parent
commit
671b5079bb
3 changed files with 2 additions and 2 deletions
  1. 0 0
      build/Three.js
  2. 0 0
      build/custom/ThreeWebGL.js
  3. 2 2
      src/renderers/WebGLShaders.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/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" ],

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