示例#1
0
        public override ISampler CreateSampler(int width, int height, int maxPathDepth, int threadIndex, int screenStartLine, int windowHeight)
        {
            //var sampler = new UniformSampler() { lowLatency = LowLatencySampling , tIdx = threadIndex, screenStartLine = screenStartLine};
            var sampler = new RandomSampler() { lowLatency = LowLatencySampling, tIdx = threadIndex, screenStartLine = screenStartLine };
            //var sampler = new LDSampler() { lowLatency = LowLatencySampling, sceneMaxPathDepth = maxPathDepth };

            return sampler;
        }
        public override ISampler CreateSampler(int width, int height, int maxPathDepth, int threadIndex, int screenStartLine, int windowHeight)
        {
            return SamplerFactory.Instance.CreateSampler(width, height, maxPathDepth, screenStartLine, LowLatencySampling,
                                                  threadIndex, windowHeight);
           // var sampler = new UniformSampler { lowLatency = LowLatencySampling, tIdx = threadIndex, screenStartLine = screenStartLine > 0 ? screenStartLine + 1 : screenStartLine, screenWidth = width, screenHeight = height };
            var sampler = new RandomSampler
                {
                    lowLatency = LowLatencySampling, tIdx = threadIndex, screenStartLine = screenStartLine > 0 ? screenStartLine + 1 : screenStartLine, screenWidth = width, screenHeight = height
                };

            //var sampler = new UniformTileSampler { lowLatency = LowLatencySampling, tIdx = threadIndex, screenStartLine = screenStartLine > 0 ? screenStartLine + 1: screenStartLine, screenWidth = width, screenHeight = height };
            //var sampler = new UniformSampler() { lowLatency = LowLatencySampling, tIdx = threadIndex, screenStartLine = screenStartLine, screenWidth = width, screenHeight = height};
            //var sampler = new RandomSampler() { lowLatency = LowLatencySampling, tIdx = threadIndex, screenStartLine = screenStartLine, screenWidth = width, screenHeight = height };
            //var sampler = new LDSampler() { lowLatency = LowLatencySampling, sceneMaxPathDepth = maxPathDepth, screenWidth = width, screenHeight = height};

            return sampler;
        }