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); }
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(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); } }
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)"); } }
/// <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(effect, false, true); base.Initialize(ginfo, factory, obj); PProjection = this._shader.Parameters["Projection"]; PView = this._shader.Parameters["View"]; PuseSpecular = this._shader.Parameters["useSpecular"]; PuseBump = this._shader.Parameters["useBump"]; PuseGlow = this._shader.Parameters["useGlow"]; PCameraPos = this._shader.Parameters["CameraPos"]; Pid = this._shader.Parameters["id"]; //PTexture = this._shader.Parameters["Texture"]; PspecularPowerScale = this._shader.Parameters["specularPowerScale"]; PspecularIntensityScale = this._shader.Parameters["specularIntensityScale"]; PspecularPower = this._shader.Parameters["specularPower"]; PspecularIntensity = this._shader.Parameters["specularIntensity"]; PWorld = this._shader.Parameters["World"]; PWorldInverseTranspose = this._shader.Parameters["WorldInverseTranspose"]; //PNormalMap = this._shader.Parameters["NormalMap"]; //PSpecularMap = this._shader.Parameters["SpecularMap"]; //Pglow = this._shader.Parameters["glow"]; PreflectionIndex = this._shader.Parameters["reflectionIndex"]; //PDiffuse = this._shader.Parameters["DifTex"]; }
/// <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(effect, true, true); base.Initialize(ginfo, factory, obj); PProjection = this._shader.Parameters["Projection"]; PView = this._shader.Parameters["View"]; PuseSpecular = this._shader.Parameters["useSpecular"]; PuseBump = this._shader.Parameters["useBump"]; PuseGlow = this._shader.Parameters["useGlow"]; PuseParalax = this._shader.Parameters["useParalax"]; Pid = this._shader.Parameters["id"]; //PTexture = this._shader.Parameters["Texture"]; PspecularPowerScale = this._shader.Parameters["specularPowerScale"]; PspecularIntensityScale = this._shader.Parameters["specularIntensityScale"]; PspecularPower = this._shader.Parameters["specularPower"]; PspecularIntensity = this._shader.Parameters["specularIntensity"]; PWorld = this._shader.Parameters["World"]; PWorldInverseTranspose = this._shader.Parameters["WorldInverseTranspose"]; //PNormalMap = this._shader.Parameters["NormalMap"]; //PSpecularMap = this._shader.Parameters["SpecularMap"]; //Pglow = this._shader.Parameters["glow"]; //PAmbientCube = this._shader.Parameters["ambientcube"]; PAmbientCubeMapScale = this._shader.Parameters["ambientScale"]; if (useAmbientCubeMap == true) { this._shader.CurrentTechnique = this._shader.Techniques["Technique2"]; } else { this._shader.CurrentTechnique = this._shader.Techniques["Technique1"]; } }
protected override void LoadContent(PloobsEngine.Engine.GraphicInfo GraphicInfo, PloobsEngine.Engine.GraphicFactory factory, IContentManager contentManager) { base.LoadContent(GraphicInfo, factory, contentManager); staticRandomTex = factory.CreateTexture2DRandom(32, 32); ///tem q ser 32, pq o shader espera isso (nao vale a pena alterar o shader para deixar independente de resolucao) target = factory.CreateRenderTarget(GraphicInfo.BackBufferWidth, GraphicInfo.BackBufferHeight); effect = factory.GetEffect("Effects\\perlin"); }
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); }
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); }
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); }
public override void Initialize(PloobsEngine.Engine.GraphicInfo ginfo, PloobsEngine.Engine.GraphicFactory factory, PloobsEngine.SceneControl.IObject obj) { this.ginfo = ginfo; Effect = factory.GetEffect("Effects/fluid"); r1 = factory.CreateRenderTarget(ginfo.BackBufferWidth, ginfo.BackBufferHeight, SurfaceFormat.Single); r2 = factory.CreateRenderTarget(ginfo.BackBufferWidth, ginfo.BackBufferHeight, SurfaceFormat.Single); r3 = factory.CreateRenderTarget(ginfo.BackBufferWidth, ginfo.BackBufferHeight, SurfaceFormat.Color); gaussian = factory.CreateRenderTarget(ginfo.BackBufferWidth, ginfo.BackBufferHeight, SurfaceFormat.Single); ComputeKernel(BLUR_RADIUS, BLUR_AMOUNT); ComputeOffsets(ginfo.BackBufferWidth, ginfo.BackBufferHeight); }
public override void Init(PloobsEngine.Engine.GraphicInfo ginfo, PloobsEngine.Engine.GraphicFactory factory) { effect = factory.GetEffect("Effects/AdvancedColorTone"); }
public override void Init(PloobsEngine.Engine.GraphicInfo ginfo, PloobsEngine.Engine.GraphicFactory factory) { effect = factory.GetEffect("Effects/Projective"); }
/// <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); }
public override void Init(PloobsEngine.Engine.GraphicInfo ginfo, PloobsEngine.Engine.GraphicFactory factory) { effect = factory.GetEffect("Night", false, true); tex = factory.GetTexture2D("noise_tex6", true); }
public override void Init(PloobsEngine.Engine.GraphicInfo ginfo, PloobsEngine.Engine.GraphicFactory factory) { effect = factory.GetEffect("Effects/UnderWater"); }
public override void Init(PloobsEngine.Engine.GraphicInfo ginfo, PloobsEngine.Engine.GraphicFactory factory) { effect = factory.GetEffect("MotionBlur", false, true); }
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); }
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); }
public override void Init(PloobsEngine.Engine.GraphicInfo ginfo, PloobsEngine.Engine.GraphicFactory factory) { effect = factory.GetEffect("Effects/backgroundTexture"); BackGroundTexture = factory.GetTexture2D(BackTextureName); }