public static PostProcessComponent Glow() { var cGlow = new PostProcessComponent() { AssetName = "Glow", TagFilter = "Glow", Actions = new List <PostProcessAction>() { new PostProcessAction(Param.Engine, Param.EngineActions.RenderSceneToTexture, new [] { -1 }), new PostProcessAction("PostProcess", "Default", new [] { 0 }, scale: 0.5f), new PostProcessAction("PostProcess", "GaussianBlurH", new [] { 1 }, scale: 0.5f), new PostProcessAction("PostProcess", "GaussianBlurV", new [] { 2 }, scale: 0.5f), new PostProcessAction("PostProcess", "Default", new [] { 3 }), new PostProcessAction("PostProcess", "Glow", new [] { 0, 4 }, OutputRule.Output) } }; return(cGlow); }
public static PostProcessComponent Bloom(float downScale, TargetOutput target = TargetOutput.Backbuffer) { var cGlow = new PostProcessComponent() { AssetName = "Bloom", TagFilter = "Bloom", Target = target, Actions = new List <PostProcessAction>() { new PostProcessAction(Param.Engine, Param.EngineActions.RenderSceneToTexture, new [] { -1 }), new PostProcessAction(Param.Shaders.PostProcess, "BloomExtract", new [] { 0 }, scale: downScale), new PostProcessAction(Param.Shaders.PostProcess, "GaussianBlurH", new [] { 1 }, scale: downScale), new PostProcessAction(Param.Shaders.PostProcess, "GaussianBlurV", new [] { 2 }, scale: downScale), new PostProcessAction(Param.Shaders.PostProcess, "BloomCombine", new [] { 0, 3 }, OutputRule.Output), } }; return(cGlow); }