本文整理汇总了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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}