当前位置: 首页>>代码示例>>C#>>正文


C# RenderHelper.RenderTextureToFullScreenSpriteBatch方法代码示例

本文整理汇总了C#中RenderHelper.RenderTextureToFullScreenSpriteBatch方法的典型用法代码示例。如果您正苦于以下问题:C# RenderHelper.RenderTextureToFullScreenSpriteBatch方法的具体用法?C# RenderHelper.RenderTextureToFullScreenSpriteBatch怎么用?C# RenderHelper.RenderTextureToFullScreenSpriteBatch使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在RenderHelper的用法示例。


在下文中一共展示了RenderHelper.RenderTextureToFullScreenSpriteBatch方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Draw

 public override void Draw(Texture2D ImageToProcess, RenderHelper rHelper, GameTime gt, Engine.GraphicInfo GraphicInfo, IWorld world, bool useFloatingBuffer)
 {        
     if(useFloatingBuffer)
         rHelper.RenderTextureToFullScreenSpriteBatch(ImageToProcess, effect, GraphicInfo.FullScreenRectangle, SamplerState.PointClamp);
     else
         rHelper.RenderTextureToFullScreenSpriteBatch(ImageToProcess, effect, GraphicInfo.FullScreenRectangle, GraphicInfo.SamplerState);            
 }
开发者ID:brunoduartec,项目名称:port-ploobsengine,代码行数:7,代码来源:BlackWhitePostEffect.cs

示例2: Draw

 public override void Draw(Microsoft.Xna.Framework.Graphics.Texture2D ImageToProcess, RenderHelper rHelper, Microsoft.Xna.Framework.GameTime gt, PloobsEngine.Engine.GraphicInfo GraphicInfo, IWorld world, bool useFloatBuffer)
 {
     
     
     if (useFloatBuffer)
         rHelper.RenderTextureToFullScreenSpriteBatch(ImageToProcess, effect, GraphicInfo.FullScreenRectangle, SamplerState.PointClamp);
     else
         rHelper.RenderTextureToFullScreenSpriteBatch(ImageToProcess, effect, GraphicInfo.FullScreenRectangle, GraphicInfo.SamplerState);
 }
开发者ID:brunoduartec,项目名称:port-ploobsengine,代码行数:9,代码来源:HeatPostEffect.cs

示例3: Draw

        public override void Draw(Microsoft.Xna.Framework.Graphics.Texture2D ImageToProcess, RenderHelper rHelper, Microsoft.Xna.Framework.GameTime gt, PloobsEngine.Engine.GraphicInfo GraphicInfo, IWorld world, bool useFloatBuffer)
        {
            effect.Parameters["extrart"].SetValue(rHelper[PrincipalConstants.extra1RT]);
            effect.Parameters["backtex"].SetValue(BackGroundTexture); 

            if (useFloatBuffer)
                rHelper.RenderTextureToFullScreenSpriteBatch(ImageToProcess, effect, GraphicInfo.FullScreenRectangle, SamplerState.PointClamp);
            else
                rHelper.RenderTextureToFullScreenSpriteBatch(ImageToProcess, effect, GraphicInfo.FullScreenRectangle, GraphicInfo.SamplerState);                         
        }
开发者ID:brunoduartec,项目名称:port-ploobsengine,代码行数:10,代码来源:BackgroundTexture.cs

示例4: Draw

        public override void Draw(Texture2D ImageToProcess, RenderHelper rHelper, GameTime gt, Engine.GraphicInfo GraphicInfo, IWorld world, bool useFloatingBuffer)
        {         
            //Draw a quad using the "effect", passing the CurrentImage as a Parameter            
            effect.Parameters["saturation"].SetValue(saturation);

            if (useFloatingBuffer)
                rHelper.RenderTextureToFullScreenSpriteBatch(ImageToProcess, effect, GraphicInfo.FullScreenRectangle, SamplerState.PointClamp);
            else
                rHelper.RenderTextureToFullScreenSpriteBatch(ImageToProcess, effect, GraphicInfo.FullScreenRectangle, GraphicInfo.SamplerState);            
        }
开发者ID:brunoduartec,项目名称:port-ploobsengine,代码行数:10,代码来源:SaturationPostEffect.cs

示例5: Draw

 public override void Draw(Texture2D ImageToProcess, RenderHelper rHelper, GameTime gt, Engine.GraphicInfo GraphicInfo, IWorld world, bool useFloatingBuffer)
 {
     m_Timer += (float)gt.ElapsedGameTime.Milliseconds / 500;
     noise.Parameters["fTimer"].SetValue(m_Timer);
     noise.Parameters["iSeed"].SetValue(1337);
     noise.Parameters["fNoiseAmount"].SetValue(0.01f);
     if (useFloatingBuffer)
         rHelper.RenderTextureToFullScreenSpriteBatch(ImageToProcess, noise, GraphicInfo.FullScreenRectangle, SamplerState.PointClamp);
     else
         rHelper.RenderTextureToFullScreenSpriteBatch(ImageToProcess, noise, GraphicInfo.FullScreenRectangle, GraphicInfo.SamplerState);            
     
 }
开发者ID:brunoduartec,项目名称:port-ploobsengine,代码行数:12,代码来源:NoisePostEffect.cs

示例6: Draw

        public override void Draw(Microsoft.Xna.Framework.Graphics.Texture2D ImageToProcess, RenderHelper rHelper, Microsoft.Xna.Framework.GameTime gt, PloobsEngine.Engine.GraphicInfo GraphicInfo, IWorld world, bool useFloatBuffer)
        {
            m_Timer += (float)gt.ElapsedGameTime.Milliseconds / 500;
            effect.Parameters["vecTime"].SetValue(m_Timer);
            effect.Parameters["vecSkill1"].SetValue(vecSkill1);


            if (useFloatBuffer)
                rHelper.RenderTextureToFullScreenSpriteBatch(ImageToProcess, effect, GraphicInfo.FullScreenRectangle, SamplerState.PointClamp);
            else
                rHelper.RenderTextureToFullScreenSpriteBatch(ImageToProcess, effect, GraphicInfo.FullScreenRectangle, GraphicInfo.SamplerState);                
        }
开发者ID:brunoduartec,项目名称:port-ploobsengine,代码行数:12,代码来源:DreamPostEffect.cs

示例7: Draw

 public override void Draw(Microsoft.Xna.Framework.Graphics.Texture2D ImageToProcess, RenderHelper rHelper, Microsoft.Xna.Framework.GameTime gt, PloobsEngine.Engine.GraphicInfo GraphicInfo, IWorld world, bool useFloatBuffer)
 {
     effect.Parameters["Desat"].SetValue(Desat);
     effect.Parameters["Toned"].SetValue(Toned);
     effect.Parameters["DarkColor"].SetValue(DarkColor);
     effect.Parameters["LightColor"].SetValue(LightColor);            
     
     if (useFloatBuffer)
         rHelper.RenderTextureToFullScreenSpriteBatch(ImageToProcess, effect, GraphicInfo.FullScreenRectangle, SamplerState.PointClamp);
     else
         rHelper.RenderTextureToFullScreenSpriteBatch(ImageToProcess, effect, GraphicInfo.FullScreenRectangle, GraphicInfo.SamplerState);                
 }
开发者ID:brunoduartec,项目名称:port-ploobsengine,代码行数:12,代码来源:AdvancedTone.cs

示例8: Draw

        public override void Draw(Texture2D ImageToProcess, RenderHelper rHelper, GameTime gt, Engine.GraphicInfo GraphicInfo, IWorld world, bool useFloatingBuffer)
        {
                effect.Parameters["weight"].SetValue(weight);
                effect.Parameters["pixel_size"].SetValue(GraphicInfo.HalfPixel * 2 * pixelSizeMultiplier);
                //effect.Parameters["normal"].SetValue(rHelper[PrincipalConstants.normalRt]);
                rHelper.device.Textures[1] = rHelper[PrincipalConstants.normalRt];
                SamplerState s1 = rHelper.SetSamplerState(SamplerState.PointClamp,1);
                
                if (useFloatingBuffer)
                    rHelper.RenderTextureToFullScreenSpriteBatch(ImageToProcess, effect, GraphicInfo.FullScreenRectangle,SamplerState.PointClamp,BlendState.Opaque);
                else
                    rHelper.RenderTextureToFullScreenSpriteBatch(ImageToProcess, effect, GraphicInfo.FullScreenRectangle, GraphicInfo.SamplerState, BlendState.Opaque);

                rHelper.SetSamplerState(s1, 1);
        }
开发者ID:brunoduartec,项目名称:port-ploobsengine,代码行数:15,代码来源:AntiAliasingPostEffect.cs

示例9: Draw

        public override void Draw(Texture2D ImageToProcess, RenderHelper rHelper, GameTime gt, Engine.GraphicInfo GraphicInfo, IWorld world, bool useFloatingBuffer)
        {            
            rHelper.PushRenderTarget(target);
            be.Draw(ImageToProcess, rHelper,  gt, GraphicInfo, world,useFloatingBuffer);                                    
            depht.Parameters["BlurScene"].SetValue(rHelper.PopRenderTargetAsSingleRenderTarget2D());
            depht.Parameters["FarPlane"].SetValue(world.CameraManager.ActiveCamera.FarPlane);
            depht.Parameters["D1M"].SetValue(rHelper[PrincipalConstants.DephRT]);

            rHelper.Clear(Color.Black,ClearOptions.Target);
            SetShaderParameters(distance, range, world.CameraManager.ActiveCamera.NearPlane, world.CameraManager.ActiveCamera.FarPlane);
            if (useFloatingBuffer)
                rHelper.RenderTextureToFullScreenSpriteBatch(ImageToProcess, depht, GraphicInfo.FullScreenRectangle, SamplerState.PointClamp);
            else
                rHelper.RenderTextureToFullScreenSpriteBatch(ImageToProcess, depht, GraphicInfo.FullScreenRectangle, GraphicInfo.SamplerState);            
            
        }
开发者ID:brunoduartec,项目名称:port-ploobsengine,代码行数:16,代码来源:DephtOfFieldPostEffect.cs

示例10: Draw

        public override void Draw(Texture2D ImageToProcess, RenderHelper rHelper, Microsoft.Xna.Framework.GameTime gt, PloobsEngine.Engine.GraphicInfo GraphicInfo, IWorld world, bool useFloatBuffer)
        {
            rHelper.PushRenderTarget(target);
            rHelper.Clear(Color.Black);
            effectdistorcion.Parameters["halfPixel"].SetValue(GraphicInfo.HalfPixel);
            effectdistorcion.Parameters["DEPTH"].SetValue(rHelper[PrincipalConstants.DephRT]);
            effectdistorcion.Parameters["DistortionScale"].SetValue(Distortion);
            rHelper.PushDepthStencilState(DepthStencilState.None);

            foreach (var obj in objs)
            {
                IModelo modelo = obj.Modelo;

                for (int i = 0; i < modelo.MeshNumber; i++)
                {
                    BatchInformation[] bi = modelo.GetBatchInformation(i);
                    for (int j = 0; j < bi.Count(); j++)
                    {
                        Matrix w = bi[j].ModelLocalTransformation * obj.WorldMatrix;
                        effectdistorcion.Parameters["WorldViewProjection"].SetValue(w * world.CameraManager.ActiveCamera.View * world.CameraManager.ActiveCamera.Projection);
                        effectdistorcion.Parameters["WorldView"].SetValue(w * world.CameraManager.ActiveCamera.View);                        
                        rHelper.RenderBatch(bi[j], effectdistorcion);
                    }
                }
            }

           rHelper.PopDepthStencilState();

           x = rHelper.PopRenderTargetAsSingleRenderTarget2D();

           rHelper.Clear(Color.Black);
           effect.Parameters["SceneTexture"].SetValue(ImageToProcess);
           effect.Parameters["DistortionMap"].SetValue(x);
           //effect.Parameters["halfPixel"].SetValue(GraphicInfo.HalfPixel);           
           rHelper.RenderTextureToFullScreenSpriteBatch(ImageToProcess,effect,GraphicInfo.FullScreenRectangle);          
         
        }
开发者ID:brunoduartec,项目名称:port-ploobsengine,代码行数:37,代码来源:StealthPostEffect.cs

示例11: Draw

        public override void Draw(Texture2D ImageToProcess, RenderHelper rHelper, GameTime gt, Engine.GraphicInfo GraphicInfo, IWorld world, bool useFloatingBuffer)
        {   
            rHelper.PushRenderTarget(target);
            rHelper.Clear(Color.Black,ClearOptions.Target);

            SetParameters(GaussianBlurDirection.Horizontal);
            if (useFloatingBuffer)

                rHelper.RenderTextureToFullScreenSpriteBatch(ImageToProcess, gblur, GraphicInfo.FullScreenRectangle, SamplerState.PointClamp, BlendState.Opaque);
            else
                rHelper.RenderTextureToFullScreenSpriteBatch(ImageToProcess, gblur, GraphicInfo.FullScreenRectangle, GraphicInfo.SamplerState, BlendState.Opaque);
                        
            intermediateTex  = rHelper.PopRenderTargetAsSingleRenderTarget2D();
            rHelper.Clear(Color.Black, ClearOptions.Target);

             SetParameters(GaussianBlurDirection.Vertical); // Set vertical parameters
             if (useFloatingBuffer)
                 rHelper.RenderTextureToFullScreenSpriteBatch(intermediateTex, gblur, GraphicInfo.FullScreenRectangle, SamplerState.PointClamp, BlendState.Opaque);             
             else
                 rHelper.RenderTextureToFullScreenSpriteBatch(intermediateTex, gblur, GraphicInfo.FullScreenRectangle, GraphicInfo.SamplerState, BlendState.Opaque);             
                 
             
        }
开发者ID:brunoduartec,项目名称:port-ploobsengine,代码行数:23,代码来源:GaussianBlurPostEffect.cs

示例12: Draw

        public override void Draw(Texture2D ImageToProcess, RenderHelper rHelper, GameTime gt, Engine.GraphicInfo GraphicInfo, IWorld world, bool useFloatingBuffer)
        {
            if (changeColors)
            {
                rHelper.PushRenderTarget(target);                

                toon.Parameters["ColorMap"].SetValue(ImageToProcess);
                toon.Parameters["useLight"].SetValue(useLight);
                toon.Parameters["TexColor"].SetValue(rHelper[PrincipalConstants.colorRT]);
                toon.Parameters["CelMap"].SetValue(cell);
                toon.Parameters["LightMap"].SetValue(rHelper[PrincipalConstants.lightRt]);
                toon.Parameters["halfPixel"].SetValue(GraphicInfo.HalfPixel);
                if (useFloatingBuffer)
                    rHelper.RenderFullScreenQuadVertexPixel(toon, SamplerState.PointClamp);
                else
                    rHelper.RenderFullScreenQuadVertexPixel(toon, GraphicInfo.SamplerState);              

                ImageToProcess = rHelper.PopRenderTargetAsSingleRenderTarget2D();
            }

                line.Parameters["Thickness"].SetValue(1.0f);
                line.Parameters["Threshold"].SetValue(0.2f);                
                if (useFloatingBuffer)
                    rHelper.RenderTextureToFullScreenSpriteBatch(ImageToProcess, line, GraphicInfo.FullScreenRectangle, SamplerState.PointClamp);
            else
                    rHelper.RenderTextureToFullScreenSpriteBatch(ImageToProcess, line, GraphicInfo.FullScreenRectangle, GraphicInfo.SamplerState);
            
        }
开发者ID:brunoduartec,项目名称:port-ploobsengine,代码行数:28,代码来源:ToonPostEffect.cs


注:本文中的RenderHelper.RenderTextureToFullScreenSpriteBatch方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。