Пример #1
0
 public override void Init(Engine.GraphicInfo ginfo, Engine.GraphicFactory factory)
 {
     depht  = factory.GetEffect("depth", false, true);
     target = factory.CreateRenderTarget(ginfo.BackBufferWidth, ginfo.BackBufferHeight, SurfaceFormat.Color,
                                         ginfo.UseMipMap, DepthFormat.None, ginfo.MultiSample);
     be = new GaussianBlurPostEffect();
     be.Init(ginfo, factory);
 }
 public override void Init(Engine.GraphicInfo ginfo, Engine.GraphicFactory factory)
 {           
     depht = factory.GetEffect("depth",false,true);
     target = factory.CreateRenderTarget(ginfo.BackBufferWidth, ginfo.BackBufferHeight,SurfaceFormat.Color,
         ginfo.UseMipMap,DepthFormat.None,ginfo.MultiSample);
     be= new GaussianBlurPostEffect();
     be.Init(ginfo, factory); 
 }
Пример #3
0
        public override void Init(Engine.GraphicInfo ginfo, Engine.GraphicFactory factory)
        {
            target  = factory.CreateRenderTarget(ginfo.BackBufferWidth, ginfo.BackBufferHeight);
            target2 = factory.CreateRenderTarget(ginfo.BackBufferWidth, ginfo.BackBufferHeight);
            effect  = factory.GetEffect("glowPost", false, true);

            gbp = new GaussianBlurPostEffect();
            gbp.Init(ginfo, factory);
        }
        public override void Init(Engine.GraphicInfo ginfo, Engine.GraphicFactory factory)
        {
            Saturate = factory.GetEffect("Saturate", false, true);
            Saturate.Parameters["BloomThreshold"].SetValue(bloomThreshold);
            Combine = factory.GetEffect("Combine", false, true);

            renderTarget0 = factory.CreateRenderTarget(ginfo.BackBufferWidth, ginfo.BackBufferHeight, SurfaceFormat.Color, ginfo.UseMipMap, DepthFormat.None, ginfo.MultiSample);
            renderTarget1 = factory.CreateRenderTarget(ginfo.BackBufferWidth, ginfo.BackBufferHeight, SurfaceFormat.Color, ginfo.UseMipMap, DepthFormat.None, ginfo.MultiSample);

            gaussian = new GaussianBlurPostEffect();
            gaussian.Init(ginfo, factory);
        }
        public override void Init(Engine.GraphicInfo ginfo, Engine.GraphicFactory factory)
        {
            target = factory.CreateRenderTarget(ginfo.BackBufferWidth, ginfo.BackBufferHeight, SurfaceFormat.Color, ginfo.UseMipMap, DepthFormat.None, ginfo.MultiSample);

            target2 = factory.CreateRenderTarget(ginfo.BackBufferWidth, ginfo.BackBufferHeight, SurfaceFormat.Color, ginfo.UseMipMap, DepthFormat.None, ginfo.MultiSample);

            target3 = factory.CreateRenderTarget(ginfo.BackBufferWidth, ginfo.BackBufferHeight, SurfaceFormat.Color, ginfo.UseMipMap, DepthFormat.None, ginfo.MultiSample);

            effect    = factory.GetEffect("SSAOPOST", false, true);
            ssaofinal = factory.GetEffect("ssaofinal", false, true);

            RandomTexture = factory.GetTexture2D("random", true);
            gbp           = new GaussianBlurPostEffect();
            gbp.Init(ginfo, factory);
        }
        public override void Init(Engine.GraphicInfo ginfo, Engine.GraphicFactory factory)
        {
            target = factory.CreateRenderTarget(ginfo.BackBufferWidth, ginfo.BackBufferHeight, SurfaceFormat.Color, ginfo.UseMipMap, DepthFormat.None, ginfo.MultiSample);

            target2 = factory.CreateRenderTarget(ginfo.BackBufferWidth, ginfo.BackBufferHeight, SurfaceFormat.Color, ginfo.UseMipMap, DepthFormat.None, ginfo.MultiSample);

            target3 = factory.CreateRenderTarget(ginfo.BackBufferWidth, ginfo.BackBufferHeight, SurfaceFormat.Color, ginfo.UseMipMap, DepthFormat.None, ginfo.MultiSample);

            effect = factory.GetEffect("SSAOPOST", false, true);
            ssaofinal = factory.GetEffect("ssaofinal", false, true);

            RandomTexture = factory.GetTexture2D("random", true);
            gbp = new GaussianBlurPostEffect();
            gbp.Init(ginfo, factory);
        }
        public override void Init(Engine.GraphicInfo ginfo, Engine.GraphicFactory factory)
        {
            
            Saturate = factory.GetEffect("Saturate",false,true);
            Saturate.Parameters["BloomThreshold"].SetValue(bloomThreshold);
            Combine = factory.GetEffect("Combine",false,true);

            renderTarget0 = factory.CreateRenderTarget(ginfo.BackBufferWidth, ginfo.BackBufferHeight,SurfaceFormat.Color,ginfo.UseMipMap,DepthFormat.None,ginfo.MultiSample);
            renderTarget1 = factory.CreateRenderTarget(ginfo.BackBufferWidth, ginfo.BackBufferHeight, SurfaceFormat.Color, ginfo.UseMipMap, DepthFormat.None, ginfo.MultiSample);
            
            gaussian = new GaussianBlurPostEffect();            
            gaussian.Init(ginfo,factory); 
            
        }  
            public override void Init(PloobsEngine.Engine.GraphicInfo ginfo, PloobsEngine.Engine.GraphicFactory factory)
            {
                shader = factory.GetEffect("HBAO\\HorizonBasedAmbientOcclusion");
                Texture randomNormalTexture = factory.GetTexture2D("HBAO\\RandomNormal");
                shader.Parameters["randomTexture"].SetValue(randomNormalTexture);
                
                epResolution = shader.Parameters["resolution"];
                epInverseResolution = shader.Parameters["invResolution"];
                epNumberSteps = shader.Parameters["numberSteps"];
                epNumberDirections = shader.Parameters["numberDirections"];
                epContrast = shader.Parameters["contrast"];
                epLineAttenuation = shader.Parameters["attenuation"];
                epRadius = shader.Parameters["radius"];
                epAngleBias = shader.Parameters["angleBias"];
                // Others
                epFocalLength = shader.Parameters["focalLength"];
                epInvFocalLength = shader.Parameters["invFocalLength"];
                epHalfPixel = shader.Parameters["halfPixel"];
                epSqrRadius = shader.Parameters["sqrRadius"];
                epInvRadius = shader.Parameters["invRadius"];
                epTanAngleBias = shader.Parameters["tanAngleBias"];

                RenderTarget2D = factory.CreateRenderTarget(ginfo.BackBufferWidth, ginfo.BackBufferHeight);
                RenderTarget2D2 = factory.CreateRenderTarget(ginfo.BackBufferWidth, ginfo.BackBufferHeight);
                depthrender = factory.CreateRenderTarget(ginfo.BackBufferWidth , ginfo.BackBufferHeight, SurfaceFormat.Single,true);

                g = new GaussianBlurPostEffect(false);
                g.Init(ginfo, factory);
                renderdepth = factory.GetEffect("HBAO\\generateDepth");
                ssaofinal = factory.GetEffect("ssaofinal", false, true);

            }
        public override void Init(Engine.GraphicInfo ginfo, Engine.GraphicFactory factory)
        {
            target = factory.CreateRenderTarget(ginfo.BackBufferWidth, ginfo.BackBufferHeight);
            target2 = factory.CreateRenderTarget(ginfo.BackBufferWidth, ginfo.BackBufferHeight);            
            effect = factory.GetEffect("glowPost",false,true);

            gbp = new GaussianBlurPostEffect();
            gbp.Init(ginfo, factory); 


        }