Browse Source

polygonOffset contact shadows

Fluqz 4 năm trước cách đây
mục cha
commit
7477e4e209
1 tập tin đã thay đổi với 2 bổ sung0 xóa
  1. 2 0
      examples/webgl_shadow_contact.html

+ 2 - 0
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!