Browse Source

Custom blending mods

WestLangley 7 years ago
parent
commit
ab2a05ae25

+ 10 - 1
examples/js/loaders/EquiangularToCubeGenerator.js

@@ -95,7 +95,16 @@ THREE.EquiangularToCubeGenerator.prototype = {
     			vec3 color = texture2D(equirectangularMap, uv).rgb;\n\
     			\n\
 					gl_FragColor = vec4( color, 1.0 );\n\
-				}"
+				}",
+
+			blending: THREE.CustomBlending,
+			premultipliedAlpha: false,
+			blendSrc: THREE.OneFactor,
+			blendDst: THREE.ZeroFactor,
+			blendSrcAlpha: THREE.OneFactor,
+			blendDstAlpha: THREE.ZeroFactor,
+			blendEquation: THREE.AddEquation
+
 		} );
 
 	}

+ 1 - 0
examples/js/pmrem/PMREMGenerator.js

@@ -260,6 +260,7 @@ THREE.PMREMGenerator.prototype = {
 				}",
 
 			blending: THREE.CustomBlending,
+			premultipliedAlpha: false,
 			blendSrc: THREE.OneFactor,
 			blendDst: THREE.ZeroFactor,
 			blendSrcAlpha: THREE.OneFactor,