Exemple #1
0
 public void Init(int w, int h)
 {
     FinalFB = new FrameBufferColor(w, h);
     FB      = new FrameBufferColorMRT(5, w, h, Texture.TextureFormat.RGB16F);
     W       = w;
     H       = h;
 }
Exemple #2
0
 public override void Init( )
 {
     BFX             = new VEOutLine( );
     DFB             = new FrameBufferColor(App.AppInfo.W, App.AppInfo.H);
     QFX             = new VEQuadR( );
     QCT             = new VECombineTex( );
     NeedsPostRender = true;
 }
Exemple #3
0
 public PostProcessRender(int w, int h)
 {
     IW   = w;
     IH   = h;
     RBuf = new FrameBufferColor(w, h);
     FB   = new FrameBufferColor(w, h);
     FB2  = new FrameBufferColor(w, h);
     QFX  = new VEQuadR();
     GenQuad();
 }
Exemple #4
0
        public void Render()
        {
            // GL.Disable(EnableCap.Blend);
            Active = this;

            RBuf.Bind();
            GL.ClearColor(0, 0, 0, 1);
            GL.Clear(ClearBufferMask.ColorBufferBit | ClearBufferMask.DepthBufferBit);
            Scene.Render();
            RBuf.Release();

            GL.Disable(EnableCap.Blend);

            FB.Bind();
            GL.ClearColor(0, 0, 0, 1);
            GL.Clear(ClearBufferMask.ColorBufferBit | ClearBufferMask.DepthBufferBit);
            Scene.Render();
            FB.Release();
            GL.Disable(EnableCap.Blend);
            PBuf = RBuf;
            //GL.DrawBuffer(DrawBufferMode.Back);
            foreach (VPostProcess p in Processes)
            {
                //FB2.Bind ( );
                p.Bind(FB.BB);
                FB2.Bind();
                p.Render(FB.BB);
                FB2.Release();
                p.Release(FB.BB);
                FrameBufferColor ob = null;
                if (p.NeedsPostRender)
                {
                    p.PostBind(FB2.BB);

                    ob  = FB;
                    FB  = FB2;
                    FB2 = ob;

                    FB2.Bind();
                    p.PostRender(FB.BB);
                    FB2.Release();
                    FB2.Release();
                }
                ob  = FB;
                FB  = FB2;
                FB2 = ob;
                //PBuf = FB;
            }

            // GL.Viewport(0, 0, 1024, 768);
            GL.Disable(EnableCap.Blend);
            GL.ClearColor(1.0f, 0.8f, 0.8f, 0.8f);
            GL.Clear(ClearBufferMask.ColorBufferBit | ClearBufferMask.DepthBufferBit);
            DrawQuad();
        }
Exemple #5
0
 public FrameType( )
 {
     Regenerate  = true;
     FrameWidth  = App.AppInfo.W;
     FrameHeight = App.AppInfo.H;
     FrameBuffer = new FrameBufferColor(FrameWidth, FrameHeight);
     QuadFX      = new PostProcess.VEQuadR( );
     GenQuad( );
     TexBind = new List <FrameType> ( );
     //FrameBuffer
 }
Exemple #6
0
 public FrameType(Texture.TextureFormat format = Texture.TextureFormat.Normal)
 {
     Regenerate  = true;
     FrameWidth  = FW;
     FrameHeight = FH;
     FrameBuffer = new FrameBufferColor(FrameWidth, FrameHeight, format);
     QuadFX      = new PostProcess.VEQuadR();
     GenQuad();
     TexBind = new List <FrameType>();
     //FrameBuffer
 }
        private void Init(int w, int h)
        {
            DiffuseFB  = new FrameBufferColor(w, w);
            NormalFB   = new FrameBufferColor(w, h);
            SpecFB     = new FrameBufferColor(w, h);
            PositionFB = new FrameBufferColor(w, h);
            NormalsFB  = new FrameBufferColor(w, h);
            FinalFB    = new FrameBufferColor(w, h);
            W          = w;

            H = h;
        }
Exemple #8
0
 public EditMapState(string name)
 {
     MapName = name;
     EditFB  = new FrameBufferColor(1024, 1024);
 }