public GPUInstancingRenderer(VoxelPlayEnvironment env)
 {
     this.env = env;
     defaultInstancingMaterial = Resources.Load <Material> ("VoxelPlay/Materials/VP Model VertexLit");
     instancedChunks           = new FastIndexedList <VoxelChunk, InstancedChunk> ();
     batchedMeshes             = new FastList <BatchedMesh> ();
 }
예제 #2
0
 public BatchedCell(Vector3 cellPosition, float cellSize)
 {
     cellPosition   *= cellSize;
     boundsMin       = cellPosition;
     boundsMax       = cellPosition + new Vector3(cellSize, cellSize, cellSize);
     batchedMeshes   = new FastIndexedList <VoxelDefinition, BatchedMesh> ();
     instancedChunks = new FastList <InstancedChunk> ();
 }
예제 #3
0
 public GPUInstancingIndirectRenderer(VoxelPlayEnvironment env)
 {
     this.env = env;
     defaultInstancingMaterial = Resources.Load <Material> ("VoxelPlay/Materials/VP Indirect VertexLit");
     if (!SystemInfo.supportsComputeShaders)
     {
         Debug.LogError("Current platform does not support compute buffers. Switch off 'Compute Buffers' option in Voxel Play Environment inspector.");
     }
     instancedChunks = new FastIndexedList <VoxelChunk, InstancedChunk> ();
     cells           = new FastIndexedList <Vector3, BatchedCell> ();
 }