예제 #1
0
파일: game.cs 프로젝트: tincann/AGR
        public void Init(OpenTKApp app, CancellationToken exitToken)
        {
            _exitToken = exitToken;
            _app = app;
            _tasks = new Task[parallelBundles];
            _r = RNG.CreateMultipleRNGs(parallelBundles);
            
            Screen.Clear(0x2222ff);
            _acc = new Accumulator(Screen);

            //var tracer = new WhittedStyleTracer();
            var tracer = new PathTracer();
            _scene = new Scene(tracer, constructBVH: true);
            _sceneManager = new SceneManager(_camera, _scene);

            _sceneManager.Add(SceneDefinitions.Default);
            _sceneManager.Add(SceneDefinitions.DarkRoom);
            _sceneManager.Add(SceneDefinitions.PathTracerBoxCool);
            _sceneManager.Add(SceneDefinitions.PathTracerBox);
            _sceneManager.Add(SceneDefinitions.BeerTest);
            _sceneManager.Add(SceneDefinitions.Teapot);
            
            _sceneManager.SetScene(0);

            Statistics.Enabled = false;
        }
예제 #2
0
파일: game.cs 프로젝트: tincann/AGR
        public void Init(OpenTKApp app, CancellationToken exitToken)
        {
            _exitToken = exitToken;
            _app       = app;
            _tasks     = new Task[parallelBundles];
            _r         = RNG.CreateMultipleRNGs(parallelBundles);

            Screen.Clear(0x2222ff);
            _acc = new Accumulator(Screen);

            //var tracer = new WhittedStyleTracer();
            var tracer = new PathTracer();

            _scene        = new Scene(tracer, constructBVH: true);
            _sceneManager = new SceneManager(_camera, _scene);

            _sceneManager.Add(SceneDefinitions.Default);
            _sceneManager.Add(SceneDefinitions.DarkRoom);
            _sceneManager.Add(SceneDefinitions.PathTracerBoxCool);
            _sceneManager.Add(SceneDefinitions.PathTracerBox);
            _sceneManager.Add(SceneDefinitions.BeerTest);
            _sceneManager.Add(SceneDefinitions.Teapot);

            _sceneManager.SetScene(0);

            Statistics.Enabled = false;
        }
예제 #3
0
 public static void Main()
 {
     // entry point
     using (var app = new OpenTKApp())
     {
         app.Run(30.0, 0.0);
     }
 }
예제 #4
0
파일: template.cs 프로젝트: tincann/AGR
 public static void Main()
 {
     // entry point
     using (var app = new OpenTKApp())
     {
         app.Run(30.0, 0.0);
     }
 }