public VoxelMapFormat(ComputeShader shader, VoxelMapData data) { meshGen = shader; initKernels(); initTemporaryBuffers(); voxelMapData = data; setTemporaryBuffers(); SolidVoxels = null; }
void Start() { mainCamera = Camera.main; mapChunkCreation = new VoxelMapData(perlinGen, vGenConfig); mapChunkMeshing = new VoxelMapFormat(meshGen, hilbertIndicesShader, mapChunkCreation, vGenConfig); offsetIndex = firstIndex; StartCoroutine(generateChunks()); }
public VoxelMapFormat(ComputeShader shader, ComputeShader hilbertIndexShader, VoxelMapData data, VGenConfig vGenConfig) { meshGen = shader; this.hilbertIndexShader = hilbertIndexShader; this.vGenConfig = vGenConfig; initKernels(); initTemporaryBuffers(); voxelMapData = data; setTemporaryBuffers(); SolidVoxels = null; }
void Start() { mainCamera = Camera.main; mapChunkCreation = new VoxelMapData(perlinGen); mapChunkMeshing = new VoxelMapFormat(meshGen, mapChunkCreation); offsetIndex = 0; if (createSponge) { mapChunkCreation.createSponge(); } else { mapChunkCreation.callPerlinMapGenKernel(mapOffset(offsetIndex)); } mapChunkMeshing.callFaceGenKernel(); mapChunkMeshing.callFaceSumKernel(); createChunks = true; }