コード例 #1
0
        protected void Init(IIntersectionEngine device, bool lowLatency, ImageFilmBase pixelDevice, IPrimarySpaceSampler sampler,
                          SurfaceSampler ss)
        {
            intersectionDevice = device;
            // Sample buffer
            var sampleBufferSize = lowLatency ? (SAMPLE_BUFFER_SIZE / 4) : SAMPLE_BUFFER_SIZE;
            sampleBuffer = new SampleBuffer(sampleBufferSize);

            width = sampler.Width;
            height = sampler.Height;
            var rayBufferSize = lowLatency ? (RayBuffer.RayBufferSize / 8) : RayBuffer.RayBufferSize;
            this.sampler = sampler;
            _pathRayProcessors = new PathIntegrator[DeviceRenderBufferCount];
            rayBuffers = new RayBuffer[DeviceRenderBufferCount];

            for (int i = 0; i < DeviceRenderBufferCount; i++)
            {
                rayBuffers[i] = new RayBuffer(rayBufferSize);
                rayBuffers[i].UserData = threadIndex;

                _pathRayProcessors[i] = this.CreatePathBuffer(scene.MaxPaths, scene, pixelDevice, sampler, ss);
            }

            renderThread = null;
        }
コード例 #2
0
 protected virtual PathIntegrator CreatePathBuffer(int maxPath, RayEngineScene scene, ImageFilmBase pixelDevice,
                                           IPrimarySpaceSampler sampler, SurfaceSampler ss)
 {
     var integrator = new PathIntegrator();
     integrator.Init(maxPath, scene, pixelDevice, sampler, ss);
     return integrator;
 }
コード例 #3
0
 protected DeviceRenderThreadBase(int index,
                                IIntersectionEngine device,
                                RayEngineScene scn,
                                bool lowLatency,
                                ImageFilmBase pixelDevice,
                                IPrimarySpaceSampler sampler, SurfaceSampler ss)
     : this(index, scn)
 {
     Init(device, lowLatency, pixelDevice, sampler, ss);
 }