本文整理汇总了C#中PloobsEngine.GetEffect方法的典型用法代码示例。如果您正苦于以下问题:C# PloobsEngine.GetEffect方法的具体用法?C# PloobsEngine.GetEffect怎么用?C# PloobsEngine.GetEffect使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PloobsEngine
的用法示例。
在下文中一共展示了PloobsEngine.GetEffect方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Initialize
public override void Initialize(PloobsEngine.Engine.GraphicInfo ginfo, PloobsEngine.Engine.GraphicFactory factory, PloobsEngine.SceneControl.IObject obj)
{
_shader2 = factory.GetEffect("PrePass2/ShaderPass");
_shader = factory.GetEffect("PrePass2/renderobj");
base.Initialize(ginfo, factory, obj);
}
示例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: 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);
}
}
示例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: AfterLoadContent
protected override void AfterLoadContent(IContentManager manager, PloobsEngine.Engine.GraphicInfo ginfo, PloobsEngine.Engine.GraphicFactory factory)
{
base.AfterLoadContent(manager, ginfo, factory);
this.ginfo = ginfo;
pointLightEffect = factory.GetEffect("PrePass/plight");
_clearGBuffer = factory.GetEffect("PrePass/ClearGBuffer");
_lighting = factory.GetEffect("PrePass/LightingLpp");
sphereModel = new SimpleModel(factory, "Model/Dsphere");
ForwardPass = new ForwardPass(ForwardPassDescription.Default());
_width = ginfo.BackBufferWidth;
_height = ginfo.BackBufferHeight;
_cwDepthState = new DepthStencilState();
_cwDepthState.DepthBufferWriteEnable = false;
_cwDepthState.DepthBufferFunction = CompareFunction.LessEqual;
_ccwDepthState = new DepthStencilState();
_ccwDepthState.DepthBufferWriteEnable = false;
_ccwDepthState.DepthBufferFunction = CompareFunction.GreaterEqual;
_directionalDepthState = new DepthStencilState(); ;
_directionalDepthState.DepthBufferWriteEnable = false;
_directionalDepthState.DepthBufferFunction = CompareFunction.Greater;
_depthStateDrawLights = new DepthStencilState();
//we draw our volumes with front-face culling, so we have to use GreaterEqual here
_depthStateDrawLights.DepthBufferFunction = CompareFunction.GreaterEqual;
//with our z-buffer reconstructed we only need to read it
_depthStateDrawLights.DepthBufferWriteEnable = false;
_depthStateReconstructZ = new DepthStencilState
{
DepthBufferEnable = true,
DepthBufferWriteEnable = true,
DepthBufferFunction = CompareFunction.Always
};
_lightAddBlendState = new BlendState()
{
AlphaSourceBlend = Blend.One,
ColorSourceBlend = Blend.One,
AlphaDestinationBlend = Blend.One,
ColorDestinationBlend = Blend.One,
};
CreateGBuffer(factory);
}
示例6: 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);
}
示例7: 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);
}
示例8: 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);
}
示例9: Init
public override void Init(PloobsEngine.Engine.GraphicInfo ginfo, PloobsEngine.Engine.GraphicFactory factory)
{
effect = factory.GetEffect("Effects/backgroundTexture");
BackGroundTexture = factory.GetTexture2D(BackTextureName);
}
示例10: 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);
}
示例11: Init
public override void Init(PloobsEngine.Engine.GraphicInfo ginfo, PloobsEngine.Engine.GraphicFactory factory)
{
effect = factory.GetEffect("Night",false,true);
tex = factory.GetTexture2D("noise_tex6",true);
}
示例12: Init
public override void Init(PloobsEngine.Engine.GraphicInfo ginfo, PloobsEngine.Engine.GraphicFactory factory)
{
effect = factory.GetEffect("Effects/AdvancedColorTone");
}
示例13: Initialize
public override void Initialize(PloobsEngine.Engine.GraphicInfo ginfo, PloobsEngine.Engine.GraphicFactory factory, PloobsEngine.SceneControl.IObject obj)
{
alphagradative = factory.GetEffect("effects/alphagradative");
base.Initialize(ginfo, factory, obj);
}
示例14: Initialize
/// <summary>
/// Initializes this instance.
/// </summary>
/// <param name="ginfo"></param>
/// <param name="factory"></param>
/// <param name="obj"></param>
public override void Initialize(PloobsEngine.Engine.GraphicInfo ginfo, PloobsEngine.Engine.GraphicFactory factory, PloobsEngine.SceneControl.IObject obj)
{
this._shader = factory.GetEffect("Effects//ShatterEffect");
base.Initialize(ginfo, factory, obj);
}
示例15: LoadContent
protected override void LoadContent(PloobsEngine.Engine.GraphicInfo GraphicInfo, PloobsEngine.Engine.GraphicFactory factory)
{
effect = factory.GetEffect("Effects/decal");
base.LoadContent(GraphicInfo, factory);
this.GraphicInfo = GraphicInfo;
}