Nicolas Cannasse 4 年之前
父节点
当前提交
8f7f439116
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      h3d/pass/DirShadowMap.hx

+ 1 - 1
h3d/pass/DirShadowMap.hx

@@ -108,7 +108,7 @@ class DirShadowMap extends Shadows {
 
 			// Intersect with frustum bounds
 			var cameraBounds = new h3d.col.Bounds();
-			var zMin = minDist < 0 ? 1.0 : ctx.camera.distanceToDepth(minDist);
+			var zMin = minDist < 0 ? 0.0 : ctx.camera.distanceToDepth(minDist);
 			var zMax = maxDist < 0 ? 1.0 : ctx.camera.distanceToDepth(maxDist);
 			for( pt in ctx.camera.getFrustumCorners(zMax, zMin) ) {
 				pt.transform(camera.mcam);