예제 #1
0
        public void RenderDepthTexture(Environment env, Camera cam)
        {
            if (depthFbo.Width != cam.Width || depthFbo.Height != cam.Height)
            {
                depthFbo.Width  = cam.Width;
                depthFbo.Height = cam.Height;
                depthFbo.Init();
            }
            depthFbo.Capture();

            renderer.Clear(true, true, false);

            RenderBucketDepth(env, cam, Bucket.Opaque, DepthRenderMode.Depth);
            RenderBucketDepth(env, cam, Bucket.Transparent, DepthRenderMode.Depth);

            depthFbo.Release();
            depthTexture = depthFbo.ColorTexture;
        }
예제 #2
0
        public override void Render()
        {
            if (fbo.Width != cam.Width || fbo.Height != cam.Height)
            {
                fbo.Width  = cam.Width;
                fbo.Height = cam.Height;
                fbo.Init();
            }
            fbo.Capture();

            RenderManager.Renderer.Clear(true, true, false);

            renderManager.RenderBucketNormals(env, cam, RenderManager.Bucket.Opaque);
            renderManager.RenderBucketNormals(env, cam, RenderManager.Bucket.Transparent);

            fbo.Release();
            texture = fbo.ColorTexture;
        }