Trying to add some optimization. Need to remove an intersection test now

This commit is contained in:
2025-10-22 23:03:33 +02:00
parent 97d86ae77a
commit 4ef1b04156
4 changed files with 50 additions and 87 deletions

View File

@ -24,7 +24,7 @@ public class Player : MonoBehaviour
VoxelRaycastGPU.Ray[] rays = new VoxelRaycastGPU.Ray[rayCount];
FillRaysArray(rays);
voxelManager.gpuRayCaster.Init(rayCount, rays);
voxelManager.gpuRayCaster.Init(rayCount, rays, 3);
}
void Cast( ref VoxelRaycastGPU.BatchData[] batchData, int batchCount, int iIteration )
@ -142,7 +142,7 @@ public class Player : MonoBehaviour
VoxelRaycastGPU.BatchData[] batchDatas = new VoxelRaycastGPU.BatchData[1];
batchDatas[0].origin = origin;
batchDatas[0].maxDistance = 100;
batchDatas[0].maxDistance = 300;
Cast(ref batchDatas, 1, 0);
sw.Stop();