protected override void Init(PipelineResources res) { // debugMat = new Material(debug); allSettings = new Dictionary <Type, PostProcessEffectSettings>(10); allPostEffects = new List <PostEffect>(10); AddEvents <DepthOfField, DepthOfFieldRenderer>(true); AddEvents <MotionBlur, MotionBlurRenderer>(true); AddEvents <LensDistortion, LensDistortionRenderer>(); AddEvents <ChromaticAberration, ChromaticAberrationRenderer>(); AddEvents <Bloom, BloomRenderer>(); AddEvents <AutoExposure, AutoExposureRenderer>(); AddEvents <Vignette, VignetteRenderer>(); AddEvents <ColorGrading, ColorGradingRenderer>(); postContext = new PostProcessRenderContext(); postContext.Reset(); postContext.propertySheets = new PropertySheetFactory(); postContext.resources = resources; postContext.logHistogram = new LogHistogram(); postContext.uberSheet = new PropertySheet(new Material(resources.shaders.uber)); Shader.SetGlobalFloat("_RenderViewportScaleFactor", 1); motionBlurRenderer = new MotionBlurRenderer(); cyberColor.Init(); foreach (var i in profile.settings) { allSettings.Add(i.GetType(), i); } }
protected override void Init(PipelineResources res) { allEvents = new Dictionary <Type, PostEffect>(7); AddEvents <MotionBlur, MotionBlurRenderer>(true); AddEvents <LensDistortion, LensDistortionRenderer>(); AddEvents <ChromaticAberration, ChromaticAberrationRenderer>(); AddEvents <Bloom, BloomRenderer>(); AddEvents <AutoExposure, AutoExposureRenderer>(); AddEvents <ColorGrading, ColorGradingRenderer>(); postContext = new PostProcessRenderContext(); postContext.Reset(); postContext.propertySheets = new PropertySheetFactory(); postContext.resources = resources; postContext.logHistogram = new LogHistogram(); postContext.uberSheet = new PropertySheet(new Material(resources.shaders.uber)); Shader.SetGlobalFloat("_RenderViewportScaleFactor", 1); motionBlurRenderer = new MotionBlurRenderer(); }