瀏覽代碼

Proper shadow bounds for Instanced primitive with non zero absPos.

clandrin 3 年之前
父節點
當前提交
1454b876bd
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      h3d/pass/DirShadowMap.hx

+ 1 - 1
h3d/pass/DirShadowMap.hx

@@ -75,7 +75,7 @@ class DirShadowMap extends Shadows {
 				var b = m.primitive.getBounds();
 				if( b.xMin > b.xMax ) return;
 
-				var absPos = m.getAbsPos();
+				var absPos = Std.isOfType(m.primitive, h3d.prim.Instanced) ? h3d.Matrix.I() : m.getAbsPos();
 				if( autoZPlanes ) {
 					btmp.load(b);
 					btmp.transform(absPos);