public PathSampleProcessor(int maxpaths, RayEngineScene rayEngineScene, CorrectorImageFilm pixelDevice, GlobalSamplingContext samplers) { this.maxPaths = maxpaths; this.rayEngineScene = rayEngineScene; this.pixelDevice = pixelDevice; this.samplers = samplers; this.sampleBuffer = pixelDevice.GetFreeSampleBuffer(); this.paths = new List<PathSampler>(maxPaths); }
public CorrectorRenderThread(int index, IIntersectionEngine device, RayEngineScene scn, bool lowLatency, CorrectorImageFilm pixelDevice, GlobalSamplingContext sc, IFrameManager fM) : base(index, scn) { this.pixelDevice = pixelDevice; this.frameManager = fM; Init(device, lowLatency, pixelDevice, sc); }
private void Init(IIntersectionEngine device, bool lowLatency, CorrectorImageFilm pixelDevice, GlobalSamplingContext sc) { this.samplers = sc; intersectionDevice = device; width = pixelDevice.Width; height = pixelDevice.Height; var rayBufferSize = lowLatency ? (RayBuffer.RayBufferSize / 8) : RayBuffer.RayBufferSize; rayBuffers = new RayBuffer[DeviceRenderBufferCount]; this.pixelDevice = pixelDevice; for (int i = 0; i < DeviceRenderBufferCount; i++) { rayBuffers[i] = new RayBuffer(rayBufferSize); rayBuffers[i].UserData = threadIndex; } _pathRayProcessors = new PathSampleProcessor(scene.MaxPaths, (RayEngineScene)scene, pixelDevice, samplers); //_pathRayProcessors.RequestSamplesFunc = (f)=>{ GenerateIm} renderThread = null; }