Beispiel #1
0
        public override void Bind(Texture2D bb)
        {
            ib = bb;
            DFB.Bind( );
            GL.ClearColor(1, 0, 0, 0);
            GL.Clear(ClearBufferMask.ColorBufferBit | ClearBufferMask.DepthBufferBit);
            OutLineGraph.RenderDepth( );

            DFB.Release( );

            GL.Disable(EnableCap.Blend);

            // var tmp = ImageProcessing.ImageProcessor.BlurImage(DFB.BB, 0.9f);

            DFB.BB.Bind(0);
            bb.Bind(1);
            BFX.Bind( );
        }
Beispiel #2
0
        public void DrawShadowMap(SceneGraph3D graph)
        {
            Active = this;

            Cam3D cam = new Cam3D();

            Effect.FXG.Cam = cam;
            cam.FOV        = 90;
            cam.MaxZ       = Quality.ShadowDepth;

            graph.CamOverride = cam;
            cam.LocalPos      = LocalPos;
            cam.MaxZ          = Quality.ShadowDepth;
            // cam.LocalTurn = LocalTurn;

            int fn = 0;

            GL.Disable(EnableCap.ScissorTest);
            App.SetVP.Set(0, 0, App.AppInfo.W, App.AppInfo.H);

            TextureTarget f = ShadowFB.SetFace(fn);

            SetCam(f, cam);

            graph.RenderingShadows = true;

            graph.RenderDepth();

            SetCam(ShadowFB.SetFace(1), cam);
            graph.RenderDepth();

            // ShadowFB.Release(); graph.CamOverride = null;

            SetCam(ShadowFB.SetFace(2), cam);
            graph.RenderDepth();

            SetCam(ShadowFB.SetFace(3), cam);
            graph.RenderDepth();

            SetCam(ShadowFB.SetFace(4), cam);
            graph.RenderDepth();

            SetCam(ShadowFB.SetFace(5), cam);
            graph.RenderDepth();

            ShadowFB.Release();

            graph.RenderingShadows = false;
            graph.CamOverride      = null;
        }
Beispiel #3
0
        public void DrawShadowMap(SceneGraph3D graph)
        {
            Active = this;

            GraphCam3D cam = new GraphCam3D();

            Effect.FXG.Cam  = cam;
            cam.FOV         = 90;
            cam.MaxZ        = Quality.ShadowDepth;
            Effect.FXG.Proj = cam.ProjMat;

            graph.CamOverride = cam;
            cam.LocalPos      = LocalPos;
            cam.MaxZ          = Quality.ShadowDepth;
            //  cam.LocalTurn = LocalTurn;

            int fn = 0;

            var f = ShadowFB.SetFace(fn);

            SetCam(f, cam);

            graph.RenderDepth();



            SetCam(ShadowFB.SetFace(1), cam);
            graph.RenderDepth();

            // ShadowFB.Release();
            //  graph.CamOverride = null;


            SetCam(ShadowFB.SetFace(2), cam);
            graph.RenderDepth();

            SetCam(ShadowFB.SetFace(3), cam);
            graph.RenderDepth();

            SetCam(ShadowFB.SetFace(4), cam);
            graph.RenderDepth();

            SetCam(ShadowFB.SetFace(5), cam);
            graph.RenderDepth();

            ShadowFB.Release();

            graph.CamOverride = null;
        }