Пример #1
0
        public SuperSampling(int resolution, float samplingSubPixelDivision, PotatoSceneData sceneData, PotatoTracer tracer)
        {
            this.samplingSubPixelDivision = samplingSubPixelDivision;
            this.tracer    = tracer;
            this.sceneData = sceneData;

            halfResolution  = resolution / 2;
            samplingAverage = (int)(samplingSubPixelDivision * samplingSubPixelDivision);
        }
        public PotatoRenderer(PotatoScene scene, int lightIndex)
        {
            this.scene = scene;
            option     = scene.GetOptions();

            textureManager = new TextureManager();
            textureManager.AddTextures(scene.GetTexturesPath());
            tracer = new PotatoTracer(scene, textureManager);

            this.lightIndex = lightIndex;

            if (option.SuperSampling)
            {
                superSampling = new SuperSampling(option.Height, option.SuperSamplingDivision, scene, tracer);
            }
        }