void OnPauseRoutineEnd(bool isPaused, float routineTime)
        {
            SteamVR_Fade.Start(Color.clear, routineTime);
            if (!isPaused)
            {
                hmdCamera.clearFlags      = lastClearFlags;
                hmdCamera.backgroundColor = lastClearColor;

                lastFog.SetFog();
                EnableAllLights();
                DisablePauseRoomLight();
            }
            else
            {
                lastClearFlags = hmdCamera.clearFlags;
                lastClearColor = hmdCamera.backgroundColor;

                hmdCamera.clearFlags      = CameraClearFlags.SolidColor;
                hmdCamera.backgroundColor = Color.black;

                lastFog = new FogComponent(true);
                pauseFog.SetFog();

                DisableAllLights();
                EnablePauseRoomLight();
            }
        }
Esempio n. 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_AmbientOcclusion      = AddComponent(new AmbientOcclusionComponent());
            m_ScreenSpaceReflection = AddComponent(new ScreenSpaceReflectionComponent());
            m_FogComponent          = AddComponent(new FogComponent());
            m_MotionBlur            = AddComponent(new MotionBlurComponent());
            m_Taa                 = AddComponent(new TaaComponent());
            m_EyeAdaptation       = AddComponent(new EyeAdaptationComponent());
            m_DepthOfField        = AddComponent(new DepthOfFieldComponent());
            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_Dithering           = AddComponent(new DitheringComponent());
            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);
            }

            useGUILayout = false;
        }
 void Awake()
 {
     pauseFog = new FogComponent(true, Color.black, FogMode.Exponential, 1, 0, 0);
 }