Shader optimizations
This commit is contained in:
@ -95,18 +95,20 @@ public class VoxelRaycastGpuManager
|
||||
countBuffer.GetData(countArr);
|
||||
currentCount = countArr[0];
|
||||
|
||||
sw.Stop();
|
||||
|
||||
VoxelRaycastGPU.BatchData[] hits = new VoxelRaycastGPU.BatchData[currentCount];
|
||||
hitBuffer.GetData(hits, 0, 0, currentCount);
|
||||
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.Start();
|
||||
/**
|
||||
sw.Stop();
|
||||
|
||||
VoxelRaycastGPU.BatchData[] hits = new VoxelRaycastGPU.BatchData[currentCount];
|
||||
hitBuffer.GetData(hits, 0, 0, currentCount);
|
||||
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.Start();
|
||||
*/
|
||||
|
||||
iteration++;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user