Removing clustering. Replaced by separation of axes

This commit is contained in:
2025-10-21 22:50:36 +02:00
parent 16ffd2cb57
commit 7031d8ad5e
5 changed files with 209 additions and 676 deletions

View File

@ -29,18 +29,18 @@ public class Player : MonoBehaviour
void Cast( ref VoxelRaycastGPU.BatchData[] batchData, int batchCount, int iIteration )
{
ComputeBuffer hitBuffer = new ComputeBuffer(rayCount * batchCount, Marshal.SizeOf(typeof(VoxelRaycastGPU.Hit)), ComputeBufferType.Append);
Stopwatch sw = Stopwatch.StartNew();
totalCastDone += batchCount * rayCount;
VoxelRaycastGPU.BatchData[] hits = voxelManager.CastGpuRay(in batchData, batchCount);
/*for( int i = 0; i < hits.Length; i++ )
{
GameObject sphere = GameObject.CreatePrimitive(PrimitiveType.Sphere);
sphere.transform.position = hits[i].origin;
sphere.transform.localScale = Vector3.one * 0.5f;
}*/
/**
for( int i = 0; i < hits.Length; i++ )
{
GameObject sphere = GameObject.CreatePrimitive(PrimitiveType.Sphere);
sphere.transform.position = hits[i].origin;
sphere.transform.localScale = Vector3.one * 0.5f;
}
*/
sw.Stop();
}