فهرست منبع

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);