void initTemporaryBuffers() { // // Init once reset counter before each call // int sizeOfVoxelGeom = System.Runtime.InteropServices.Marshal.SizeOf(new VoxelGeomDataMirror()); SolidVoxels = new ComputeBuffer(vGenConfig.VoxelsPerChunk, sizeOfVoxelGeom, ComputeBufferType.Counter); SolidVoxelsLOD2 = new ComputeBuffer(vGenConfig.VoxelsPerChunkAtLOD(1), sizeOfVoxelGeom, ComputeBufferType.Counter); SolidVoxelsLOD4 = new ComputeBuffer(vGenConfig.VoxelsPerChunkAtLOD(2), sizeOfVoxelGeom, ComputeBufferType.Counter); TotalVoxelsPerLODCount = new ComputeBuffer(ChunkGenData.LODLevels, sizeof(int)); }
void initBuffers() { MapVoxels = new ComputeBuffer(vGenConfig.ChunkPerlinGenArraySize, sizeof(uint)); MapVoxelsLOD2 = new ComputeBuffer(vGenConfig.VoxelsPerChunk / 8, sizeof(uint)); MapVoxelsLOD4 = new ComputeBuffer(vGenConfig.VoxelsPerChunk / 64, sizeof(uint)); int ShownSize = System.Runtime.InteropServices.Marshal.SizeOf(new VoxelGeomDataMirror()); ShownVoxels = new ComputeBuffer(vGenConfig.VoxelsPerChunk, ShownSize, ComputeBufferType.Counter); ShownVoxelsLOD2 = new ComputeBuffer(vGenConfig.VoxelsPerChunkAtLOD(1), ShownSize, ComputeBufferType.Counter); ShownVoxelsLOD4 = new ComputeBuffer(vGenConfig.VoxelsPerChunkAtLOD(2), ShownSize, ComputeBufferType.Counter); ExistsMap27 = new ComputeBuffer(vGenConfig.SizeOfExistsMap * 27, sizeof(uint)); }
void initTemporaryBuffers() { ShownVoxels = new ComputeBuffer(vGenConfig.VoxelsPerChunk, sizeof(int), ComputeBufferType.Counter); ShownVoxelsLOD2 = new ComputeBuffer(vGenConfig.VoxelsPerChunkAtLOD(1), sizeof(int), ComputeBufferType.Counter); ShownVoxelsLOD4 = new ComputeBuffer(vGenConfig.VoxelsPerChunkAtLOD(2), sizeof(int), ComputeBufferType.Counter); }