浏览代码

polygonOffset contact shadows

Fluqz 4 年之前
父节点
当前提交
7477e4e209
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      examples/webgl_shadow_contact.html

+ 2 - 0
examples/webgl_shadow_contact.html

@@ -117,6 +117,8 @@
 					transparent: true,
 					transparent: true,
 				} );
 				} );
 				plane = new THREE.Mesh( planeGeometry, planeMaterial );
 				plane = new THREE.Mesh( planeGeometry, planeMaterial );
+				plane.material.polygonOffset = true;
+				plane.material.polygonOffsetFactor = -.1;
 				shadowGroup.add( plane );
 				shadowGroup.add( plane );
 
 
 				// the y from the texture is flipped!
 				// the y from the texture is flipped!