Mr.doob пре 5 месеци
родитељ
комит
60ca5158e7
2 измењених фајлова са 5 додато и 6 уклоњено
  1. BIN
      examples/models/gltf/ferrari_ao_.png
  2. 5 6
      examples/webgl_lights_rectarealight_map.html

BIN
examples/models/gltf/ferrari_ao_.png


+ 5 - 6
examples/webgl_lights_rectarealight_map.html

@@ -85,16 +85,15 @@
 				scene.add( mshStdFloor );
 
 				// Car shadow (AO plane)
-				const aoTexture = new THREE.TextureLoader().load( 'models/gltf/ferrari_ao_.png' );
+				const aoTexture = new THREE.TextureLoader().load( 'models/gltf/ferrari_ao.png' );
 				const shadowPlane = new THREE.Mesh(
 					new THREE.PlaneGeometry( 256, 512 ),
 					new THREE.MeshBasicMaterial( {
-						color: 0x000000,
-						// map: aoTexture,
-						alphaMap: aoTexture,
-						// blending: THREE.SubstractiveBlending,
+						map: aoTexture,
+						blending: THREE.MultiplyBlending,
 						depthWrite: false,
-						transparent: true
+						transparent: true,
+						premultipliedAlpha: true
 					} )
 				);
 				shadowPlane.rotation.x = - Math.PI / 2;

粤ICP备19079148号