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> (); }
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> (); }
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> (); }