Browse Source

Fix GPU culling with screen ratio.

clementlandrin 3 tháng trước cách đây
mục cha
commit
60bee44049
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      h3d/shader/InstanceIndirect.hx

+ 1 - 1
h3d/shader/InstanceIndirect.hx

@@ -76,7 +76,7 @@ class InstanceIndirectBase extends hxsl.Shader {
 		}
 
 		function getMinScreenRatio() : Float {
-			return ENABLE_LOD ? matInfos[0].w : 0.0;
+			return ENABLE_LOD ? matInfos[matID].w : 0.0;
 		}
 
 		function computeScreenRatio( distToCam : Float, radius : Float ) : Float {