Преглед изворни кода

Merge pull request #20849 from Fluqz/contact-shadows

Example shadow / contact fix
Mr.doob пре 4 година
родитељ
комит
76c5f55826
1 измењених фајлова са 2 додато и 1 уклоњено
  1. 2 1
      examples/webgl_shadow_contact.html

+ 2 - 1
examples/webgl_shadow_contact.html

@@ -117,6 +117,8 @@
 					transparent: true,
 				} );
 				plane = new THREE.Mesh( planeGeometry, planeMaterial );
+				plane.material.polygonOffset = true;
+				plane.material.polygonOffsetFactor = -.1;
 				shadowGroup.add( plane );
 
 				// the y from the texture is flipped!
@@ -135,7 +137,6 @@
 				} );
 				fillPlane = new THREE.Mesh( planeGeometry, fillPlaneMaterial );
 				fillPlane.rotateX( Math.PI );
-				fillPlane.position.y -= 0.00001;
 				shadowGroup.add( fillPlane );
 
 				// the camera to render the depth material from