示例#1
0
        void Start()
        {
            mainCamera = Camera.main;

            mapChunkCreation = new VoxelMapData(perlinGen, vGenConfig);
            mapChunkMeshing  = new VoxelMapFormat(meshGen, hilbertIndicesShader, mapChunkCreation, vGenConfig);

            offsetIndex = firstIndex;

            StartCoroutine(generateChunks());
        }
示例#2
0
        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;
        }