本文整理汇总了C#中PloobsEngine.CreateRenderTarget方法的典型用法代码示例。如果您正苦于以下问题:C# PloobsEngine.CreateRenderTarget方法的具体用法?C# PloobsEngine.CreateRenderTarget怎么用?C# PloobsEngine.CreateRenderTarget使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PloobsEngine
的用法示例。
在下文中一共展示了PloobsEngine.CreateRenderTarget方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Init
public override void Init(PloobsEngine.Engine.GraphicInfo ginfo, PloobsEngine.Engine.GraphicFactory factory)
{
Effect = factory.GetEffect("ssao",false,true);
tex = factory.GetTexture2D("noisetex", true);
sBlurPost = new SBlurPost(blurAmount, BlurRadiusSize);
sBlurPost.Init(ginfo, factory);
RenderTarget2D = factory.CreateRenderTarget(ginfo.BackBufferWidth, ginfo.BackBufferHeight);
RenderTarget2D2 = factory.CreateRenderTarget(ginfo.BackBufferWidth, ginfo.BackBufferHeight);
}
示例2: Init
public override void Init(PloobsEngine.Engine.GraphicInfo ginfo, PloobsEngine.Engine.GraphicFactory factory)
{
effect = factory.GetEffect("effects/TransparentOnBorder");
effectdistorcion = factory.GetEffect("effects/effect2");
target = factory.CreateRenderTarget(ginfo.BackBufferWidth, ginfo.BackBufferHeight);
SetBlurEffectParameters(1f / (float)ginfo.BackBufferWidth, 1f / (float)ginfo.BackBufferHeight);
}
示例3: Initialize
public override void Initialize(PloobsEngine.Engine.GraphicInfo ginfo, PloobsEngine.Engine.GraphicFactory factory, IObject obj)
{
Effect = factory.GetEffect("Effects/baker");
base.Initialize(ginfo, factory, obj);
Effect.Parameters["halfPixel"].SetValue(ginfo.HalfPixel);
rt = factory.CreateRenderTarget(ginfo.BackBufferWidth, ginfo.BackBufferHeight);
}
示例4: Init
public override void Init(PloobsEngine.Engine.GraphicInfo ginfo, PloobsEngine.Engine.GraphicFactory factory)
{
eff = factory.GetEffect("Effects/MotionBlurComplete");
effectvelocity = factory.GetEffect("Effects/VelocityTextureMotionBlur");
if (ginfo.CheckIfRenderTargetFormatIsSupported(SurfaceFormat.Vector2, DepthFormat.None, false, 0))
{
rt = factory.CreateRenderTarget(ginfo.BackBufferWidth, ginfo.BackBufferHeight, SurfaceFormat.Vector2);
}
else
{
throw new Exception("required Buffer precision not found (Vector 2)");
}
}
示例5: Init
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);
}
示例6: Init
public override void Init(PloobsEngine.Engine.GraphicInfo ginfo, PloobsEngine.Engine.GraphicFactory factory)
{
rt = factory.CreateRenderTarget(ginfo.BackBufferWidth , ginfo.BackBufferHeight );
rtend = factory.CreateRenderTarget(ginfo.BackBufferWidth , ginfo.BackBufferHeight );
Amount = 100;
}
示例7: Initialize
public override void Initialize(PloobsEngine.Engine.GraphicInfo ginfo, PloobsEngine.Engine.GraphicFactory factory, PloobsEngine.SceneControl.IObject obj)
{
base.Initialize(ginfo, factory, obj);
this._shader = factory.GetEffect("WaterComplete",true,true);
refractionRT = factory.CreateRenderTarget(WIDTH,HEIGHT);
reflectionRT = factory.CreateRenderTarget(WIDTH, HEIGHT);
normal0 = factory.GetTexture2D("wave0", true);
normal1 = factory.GetTexture2D("wave1", true);
}
示例8: Init
public override void Init(PloobsEngine.Engine.GraphicInfo ginfo, PloobsEngine.Engine.GraphicFactory factory)
{
switch (BlurRadiusSize)
{
case BlurRadiusSize.Fifteen:
effect = factory.GetEffect("sblur", true,true);
break;
case BlurRadiusSize.Seven:
effect = factory.GetEffect("sblur2", true, true);
break;
case BlurRadiusSize.Three:
effect = factory.GetEffect("sblur3", true, true);
break;
default:
ActiveLogger.LogMessage("Wrong Blur Radius Size Specified", LogLevel.RecoverableError);
effect = factory.GetEffect("sblur", true, true);
break;
}
if (!destinySize.HasValue)
{
destinySize = new Vector2(ginfo.BackBufferWidth, ginfo.BackBufferHeight);
}
if (SurfaceFormat.HasValue)
{
if (SurfaceFormat.Value == Microsoft.Xna.Framework.Graphics.SurfaceFormat.Single ||
SurfaceFormat.Value == Microsoft.Xna.Framework.Graphics.SurfaceFormat.HalfSingle)
{
effect.CurrentTechnique = effect.Techniques["GAUSSSingle"];
}
else
{
effect.CurrentTechnique = effect.Techniques["GAUSSTriple"];
}
RenderTarget2D = factory.CreateRenderTarget((int)destinySize.Value.X, (int)destinySize.Value.Y, SurfaceFormat.Value);
}
else
{
RenderTarget2D = factory.CreateRenderTarget(ginfo.BackBufferWidth, ginfo.BackBufferHeight);
}
ComputeKernel(BLUR_RADIUS, BLUR_AMOUNT);
if (OriginSize.HasValue)
{
ComputeOffsets(OriginSize.Value.X, OriginSize.Value.Y);
}
else
{
ComputeOffsets(ginfo.BackBufferWidth, ginfo.BackBufferHeight);
}
}