Example #1
0
 private void Awake()
 {
     cvoxelMapData        = new CVoxelMapData(perlinGen, vGenConfig);
     cvoxelMapFormat      = new CVoxelMapFormat(meshGen, hilbertShader, cvoxelMapData, vGenConfig);
     cvoxelNeighborFormat = new CVoxelNeighborFormat(neighborFormat, vGenConfig);
     cvoxelFaceCopy       = new CVoxelFaceCopy(neighborFormat, cvoxelNeighborFormat, vGenConfig);
 }
Example #2
0
        public CVoxelMapFormat(ComputeShader shader, ComputeShader hilbertIndexShader, CVoxelMapData data, VGenConfig vGenConfig)
        {
            meshGen = shader;

            this.vGenConfig = vGenConfig;

            initKernels();
            initTemporaryBuffers();
            voxelMapData = data;
            setTemporaryBuffers();

            SolidVoxels = null;
        }