コード例 #1
0
        void OnEnable()
        {
            m_CommandBuffers       = new Dictionary <Type, KeyValuePair <CameraEvent, CommandBuffer> >();
            m_MaterialFactory      = new MaterialFactory();
            m_RenderTextureFactory = new RenderTextureFactory();
            m_Context = new PostProcessingContext();

            // Keep a list of all post-fx for automation purposes
            m_Components = new List <PostProcessingComponentBase>();

            // Component list
            m_DebugViews            = AddComponent(new BuiltinDebugViewsComponent());
            m_AmbientOcclusion      = AddComponent(new AmbientOcclusionComponent());
            m_ScreenSpaceReflection = AddComponent(new ScreenSpaceReflectionComponent());
            m_DepthOfField          = AddComponent(new DepthOfFieldComponent());
            m_MotionBlur            = AddComponent(new MotionBlurComponent());
            m_Taa                 = AddComponent(new TaaComponent());
            m_EyeAdaptation       = AddComponent(new EyeAdaptationComponent());
            m_Bloom               = AddComponent(new BloomComponent());
            m_ChromaticAberration = AddComponent(new ChromaticAberrationComponent());
            m_ColorGrading        = AddComponent(new ColorGradingComponent());
            m_UserLut             = AddComponent(new UserLutComponent());
            m_Grain               = AddComponent(new GrainComponent());
            m_Vignette            = AddComponent(new VignetteComponent());
            m_Fxaa                = AddComponent(new FxaaComponent());

            // Prepare state observers
            m_ComponentStates = new Dictionary <PostProcessingComponentBase, bool>();

            foreach (var component in m_Components)
            {
                m_ComponentStates.Add(component, false);
            }
        }
コード例 #2
0
        void OnEnable()
        {
            m_CommandBuffers       = new Dictionary <Type, KeyValuePair <CameraEvent, CommandBuffer> >();
            m_MaterialFactory      = new MaterialFactory();
            m_RenderTextureFactory = new RenderTextureFactory();
            m_Context = new PostProcessingContext();

            // Keep a list of all post-fx for automation purposes
            m_Components = new List <PostProcessingComponentBase>();

            // Component list
            m_DebugViews   = AddComponent(new BuiltinDebugViewsComponent());
            m_DepthOfField = AddComponent(new DepthOfFieldComponent());
            m_Bloom        = AddComponent(new BloomComponent());
            m_ColorGrading = AddComponent(new ColorGradingComponent());
            m_Vignette     = AddComponent(new VignetteComponent());

            // Prepare state observers
            m_ComponentStates = new Dictionary <PostProcessingComponentBase, bool>();

            foreach (var component in m_Components)
            {
                m_ComponentStates.Add(component, false);
            }

            useGUILayout = false;
        }
コード例 #3
0
 private void OnEnable()
 {
     this.m_CommandBuffers       = new Dictionary <Type, KeyValuePair <CameraEvent, CommandBuffer> >();
     this.m_MaterialFactory      = new MaterialFactory();
     this.m_RenderTextureFactory = new RenderTextureFactory();
     this.m_Context               = new PostProcessingContext();
     this.m_Components            = new List <PostProcessingComponentBase>();
     this.m_DebugViews            = this.AddComponent <BuiltinDebugViewsComponent>(new BuiltinDebugViewsComponent());
     this.m_AmbientOcclusion      = this.AddComponent <AmbientOcclusionComponent>(new AmbientOcclusionComponent());
     this.m_ScreenSpaceReflection = this.AddComponent <ScreenSpaceReflectionComponent>(new ScreenSpaceReflectionComponent());
     this.m_FogComponent          = this.AddComponent <FogComponent>(new FogComponent());
     this.m_MotionBlur            = this.AddComponent <MotionBlurComponent>(new MotionBlurComponent());
     this.m_Taa                 = this.AddComponent <TaaComponent>(new TaaComponent());
     this.m_EyeAdaptation       = this.AddComponent <EyeAdaptationComponent>(new EyeAdaptationComponent());
     this.m_DepthOfField        = this.AddComponent <DepthOfFieldComponent>(new DepthOfFieldComponent());
     this.m_Bloom               = this.AddComponent <BloomComponent>(new BloomComponent());
     this.m_ChromaticAberration = this.AddComponent <ChromaticAberrationComponent>(new ChromaticAberrationComponent());
     this.m_ColorGrading        = this.AddComponent <ColorGradingComponent>(new ColorGradingComponent());
     this.m_UserLut             = this.AddComponent <UserLutComponent>(new UserLutComponent());
     this.m_Grain               = this.AddComponent <GrainComponent>(new GrainComponent());
     this.m_Vignette            = this.AddComponent <VignetteComponent>(new VignetteComponent());
     this.m_Dithering           = this.AddComponent <DitheringComponent>(new DitheringComponent());
     this.m_Fxaa                = this.AddComponent <FxaaComponent>(new FxaaComponent());
     this.m_ComponentStates     = new Dictionary <PostProcessingComponentBase, bool>();
     foreach (PostProcessingComponentBase base2 in this.m_Components)
     {
         this.m_ComponentStates.Add(base2, false);
     }
     base.useGUILayout = false;
 }
コード例 #4
0
 public PostProcessingContext Reset()
 {
     this.profile              = null;
     this.camera               = null;
     this.materialFactory      = null;
     this.renderTextureFactory = null;
     this.interrupted          = false;
     return(this);
 }