private void Start() { this.scene = TDLoader.LoadScene(); int pixelResolutionX = (int)this.scene.camera.pixelResolution.x; int pixelResolutionY = (int)this.scene.camera.pixelResolution.y; this.cpuTexture = new Texture2D(pixelResolutionX, pixelResolutionY); this.screenPixelPositions = this.GetScreenPixelPositions(); this.accumulatedColor = new float3[pixelResolutionX * pixelResolutionY]; this.numIterations = 0; //Debug.Log(RandomPointInUnitSphere()); System.Random m_rng = new System.Random(); int kernelHandle = cs.FindKernel("CSMain"); numIterations = 0; System.Diagnostics.Stopwatch sw = new System.Diagnostics.Stopwatch(); sw.Start(); this.GPUPrepare(); //this.Render(); sw.Stop(); Debug.Log(sw.Elapsed); //this.StartCoroutine(RenderProgressiveCPU()); this.StartCoroutine(RenderProgressive()); }
override public BaseScene CreateScene(int resId) { BaseScene scene = new TDScene(); if (!InitScene(scene, resId)) { return(null); } return(scene); }