Пример #1
0
        public override void OnInspectorGUI()
        {
            if (!SystemInfo.supportsComputeShaders)
            {
                EditorGUILayout.HelpBox("Auto exposure requires compute shader support.", MessageType.Warning);
            }

            EditorUtilities.DrawHeaderLabel("Exposure");

            PropertyField(m_Filtering);

            PropertyField(m_MinLuminance);
            PropertyField(m_MaxLuminance);
            PropertyField(m_KeyValue);

            EditorGUILayout.Space();
            EditorUtilities.DrawHeaderLabel("Adaptation");

            PropertyField(m_EyeAdaptation);

            if (m_EyeAdaptation.value.intValue == (int)EyeAdaptation.Progressive)
            {
                PropertyField(m_SpeedUp);
                PropertyField(m_SpeedDown);
            }
        }
Пример #2
0
        public override void OnInspectorGUI()
        {
            EditorUtilities.DrawHeaderLabel("Bloom");

            PropertyField(m_Intensity);
            PropertyField(m_Threshold);
            PropertyField(m_SoftKnee);
            PropertyField(m_Diffusion);
            PropertyField(m_Color);
            PropertyField(m_MobileOptimized);

            EditorGUILayout.Space();
            EditorUtilities.DrawHeaderLabel("Lens Dirtiness");

            PropertyField(m_LensTexture);
            PropertyField(m_LensIntensity);

            if (RuntimeUtilities.isVREnabled)
            {
                if ((m_LensIntensity.overrideState.boolValue && m_LensIntensity.value.floatValue > 0f) ||
                    (m_LensTexture.overrideState.boolValue && m_LensTexture.value.objectReferenceValue != null))
                {
                    EditorGUILayout.HelpBox("Using lens dirt in VR is not recommended.", MessageType.Warning);
                }
            }
        }
Пример #3
0
        public override void OnInspectorGUI()
        {
            EditorUtilities.DrawHeaderLabel("Bloom");

            PropertyField(m_Intensity);
            PropertyField(m_Threshold);
            PropertyField(m_SoftKnee);
            PropertyField(m_Diffusion);
            PropertyField(m_Color);
            PropertyField(m_MobileOptimized);

            EditorGUILayout.Space();
            EditorUtilities.DrawHeaderLabel("Lens Dirtiness");

            PropertyField(m_LensTexture);
            PropertyField(m_LensIntensity);
        }
Пример #4
0
        public override void OnInspectorGUI()
        {
            EditorUtilities.DrawHeaderLabel("Exposure");

            PropertyField(m_Filtering);

            PropertyField(m_MinLuminance);
            PropertyField(m_MaxLuminance);
            PropertyField(m_KeyValue);

            EditorGUILayout.Space();
            EditorUtilities.DrawHeaderLabel("Adaptation");

            PropertyField(m_EyeAdaptation);

            if (m_EyeAdaptation.value.intValue == (int)EyeAdaptation.Progressive)
            {
                PropertyField(m_SpeedUp);
                PropertyField(m_SpeedDown);
            }
        }
Пример #5
0
        void DoStandardModeGUI(bool hdr)
        {
            if (!hdr)
            {
                PropertyField(m_LdrLut);

                var lut = (target as ColorGrading).ldrLut.value;
                CheckLutImportSettings(lut);
            }

            if (hdr)
            {
                EditorGUILayout.Space();
                EditorUtilities.DrawHeaderLabel("Tonemapping");
                PropertyField(m_Tonemapper);

                if (m_Tonemapper.value.intValue == (int)Tonemapper.Custom)
                {
                    DrawCustomToneCurve();
                    PropertyField(m_ToneCurveToeStrength);
                    PropertyField(m_ToneCurveToeLength);
                    PropertyField(m_ToneCurveShoulderStrength);
                    PropertyField(m_ToneCurveShoulderLength);
                    PropertyField(m_ToneCurveShoulderAngle);
                    PropertyField(m_ToneCurveGamma);
                }
            }

            EditorGUILayout.Space();
            EditorUtilities.DrawHeaderLabel("White Balance");

            PropertyField(m_Temperature);
            PropertyField(m_Tint);

            EditorGUILayout.Space();
            EditorUtilities.DrawHeaderLabel("Tone");

            if (hdr)
            {
                PropertyField(m_PostExposure);
            }

            PropertyField(m_ColorFilter);
            PropertyField(m_HueShift);
            PropertyField(m_Saturation);

            if (!hdr)
            {
                PropertyField(m_Brightness);
            }

            PropertyField(m_Contrast);

            EditorGUILayout.Space();
            int currentChannel = GlobalSettings.currentChannelMixer;

            using (new EditorGUILayout.HorizontalScope())
            {
                EditorGUILayout.PrefixLabel("Channel Mixer", GUIStyle.none, Styling.labelHeader);

                EditorGUI.BeginChangeCheck();
                {
                    using (new EditorGUILayout.HorizontalScope())
                    {
                        GUILayoutUtility.GetRect(9f, 18f, GUILayout.ExpandWidth(false)); // Dirty hack to do proper right column alignement
                        if (GUILayout.Toggle(currentChannel == 0, EditorUtilities.GetContent("Red|Red output channel."), EditorStyles.miniButtonLeft))
                        {
                            currentChannel = 0;
                        }
                        if (GUILayout.Toggle(currentChannel == 1, EditorUtilities.GetContent("Green|Green output channel."), EditorStyles.miniButtonMid))
                        {
                            currentChannel = 1;
                        }
                        if (GUILayout.Toggle(currentChannel == 2, EditorUtilities.GetContent("Blue|Blue output channel."), EditorStyles.miniButtonRight))
                        {
                            currentChannel = 2;
                        }
                    }
                }
                if (EditorGUI.EndChangeCheck())
                {
                    GUI.FocusControl(null);
                }
            }

            GlobalSettings.currentChannelMixer = currentChannel;

            if (currentChannel == 0)
            {
                PropertyField(m_MixerRedOutRedIn);
                PropertyField(m_MixerRedOutGreenIn);
                PropertyField(m_MixerRedOutBlueIn);
            }
            else if (currentChannel == 1)
            {
                PropertyField(m_MixerGreenOutRedIn);
                PropertyField(m_MixerGreenOutGreenIn);
                PropertyField(m_MixerGreenOutBlueIn);
            }
            else
            {
                PropertyField(m_MixerBlueOutRedIn);
                PropertyField(m_MixerBlueOutGreenIn);
                PropertyField(m_MixerBlueOutBlueIn);
            }

            EditorGUILayout.Space();
            EditorUtilities.DrawHeaderLabel("Trackballs");

            using (new EditorGUILayout.HorizontalScope())
            {
                PropertyField(m_Lift);
                GUILayout.Space(4f);
                PropertyField(m_Gamma);
                GUILayout.Space(4f);
                PropertyField(m_Gain);
            }

            EditorGUILayout.Space();
            EditorUtilities.DrawHeaderLabel("Grading Curves");

            DoCurvesGUI(hdr);
        }