void OnEnable() { _resolution = (int)resolution; _camera = GetComponent <Camera>(); _command = new CommandBuffer { name = "VXGI" }; _mipmapper = new Mipmapper(this); _parameterizer = new Parameterizer(); _voxelizer = new Voxelizer(this); _voxelShader = new VoxelShader(this); _lastVoxelSpaceCenter = voxelSpaceCenter; CreateBuffers(); CreateTextureDescriptor(); CreateTextures(); }
void OnEnable() { _resolution = (int)resolution; _camera = GetComponent <Camera>(); _command = new CommandBuffer { name = "VXGI.MonoBehaviour" }; _lights = new List <LightSource>(64); _lightSources = new ComputeBuffer(64, LightSource.size); _mipmapper = new Mipmapper(this); _parameterizer = new Parameterizer(); _voxelizer = new Voxelizer(this); _voxelShader = new VoxelShader(this); _lastVoxelSpaceCenter = voxelSpaceCenter; CreateBuffers(); CreateTextureDescriptor(); CreateTextures(); }