예제 #1
0
        /// <summary>
        /// Displays the additional parameters for directional lights
        /// </summary>
        private void DisplayDirectionalLightAdditionalSettingsArea()
        {
            EditorGUILayout.BeginVertical();

            EditorGUILayout.Separator();
            GUILayout.Label(_directionalLightSettingsTitleContent, new GUIStyle(GuiStyles.LabelBoldCenteredBig)
            {
                fontSize = 15
            });
            EditorGUILayout.Separator();

            GuiHelpers.DrawContextualHelpBox("The \"Enable Out-Of-Phase Color\" parameter allows you to use a color when the view angle is not towards the directional light (the decay is controlled by the scattering factor.");
            GuiHelpers.DrawToggleChecker(ref _enableOutOfPhaseColorProperty, "Enable Out-Of-Phase Color");
            if (_enableOutOfPhaseColorProperty.boolValue)
            {
                //EditorGUI.BeginDisabledGroup(!_enableOutOfPhaseColorProperty.boolValue);
                EditorGUILayout.BeginVertical();
                GuiHelpers.DrawContextualHelpBox("The color when the view direction is not towards the directional light.");
                EditorGUILayout.PropertyField(_outOfPhaseColorProperty);
                GuiHelpers.DrawFloatField(ref _outOfPhaseColorStrengthProperty, new GUIContent("Strength", "Multiplies the intensity of the color"));
                EditorGUILayout.EndVertical();
                //EditorGUI.EndDisabledGroup();
            }

            EditorGUILayout.Separator();

            EditorGUILayout.EndVertical();
        }
예제 #2
0
 /// <summary>
 /// Displays Texture3D Mask Area
 /// </summary>
 private void DisplayTexture3DMaskArea()
 {
     EditorGUILayout.BeginVertical(GuiStyles.Background);
     GuiHelpers.DrawToggleChecker(ref _texture3DMaskBoolProperty, new GUIContent("Texture3D Mask", Aura.ResourcesCollection.texture3DIconTexture, "The \"Texture Mask\" allows to assign a texture mask to the volume.\nRGB -> Will multiply the \"Strength\" parameter of the Color Injection.\nA -> Will multiply the \"Strength\" parameter of the Density and Scattering Injection"), true, true);
     if (_texture3DMaskBoolProperty.boolValue)
     {
         //EditorGUI.BeginDisabledGroup(!_texture3DMaskBoolProperty.boolValue);
         EditorGUILayout.BeginVertical(GuiStyles.EmptyMiddleAligned);
         GUILayout.Label(new GUIContent(" Experimental Feature (PREVIEW)", Aura.ResourcesCollection.experimentalIconTexture), GuiStyles.LabelBoldCentered);
         EditorGUILayout.BeginHorizontal();
         GUILayout.Label("Texture3D Mask", GuiStyles.Label, GUILayout.MaxWidth(100));
         EditorGUILayout.PropertyField(_texture3DMaskTextureProperty, new GUIContent(""));
         EditorGUILayout.EndHorizontal();
         Texture3D textureMask = (Texture3D)_texture3DMaskTextureProperty.objectReferenceValue;
         if (textureMask != null)
         {
             if (textureMask.width != VolumesCommonDataManager.texture3DMaskSize || textureMask.height != VolumesCommonDataManager.texture3DMaskSize || textureMask.depth != VolumesCommonDataManager.texture3DMaskSize)
             {
                 GuiHelpers.DrawHelpBox("The Texture3D mask \"" + textureMask.name + "\" of \"" + _currentVolume.name + "\" volume is not of the required size, which is " + VolumesCommonDataManager.texture3DMaskSize + "³", HelpBoxType.Warning);
             }
         }
         EditorGUILayout.Separator();
         EditorGUILayout.Separator();
         GuiHelpers.DrawTransformField(ref _texture3DMaskTransformProperty);
         EditorGUILayout.EndVertical();
         //EditorGUI.EndDisabledGroup();
     }
     EditorGUILayout.EndVertical();
 }
예제 #3
0
        /// <summary>
        /// Displays the common parameters tab
        /// </summary>
        private void DisplayCommonSettingsArea()
        {
            EditorGUILayout.BeginVertical(GuiStyles.ButtonNoHover);

            EditorGUILayout.Separator();
            GUILayout.Label(_commonSettingsTitleContent, new GUIStyle(GuiStyles.LabelBoldCenteredBig)
            {
                fontSize = 15
            });
            EditorGUILayout.Separator();

            GuiHelpers.DrawFloatField(ref _strengthProperty, new GUIContent("Strength", "Multiplies the intensity of the light source in the system"));

            EditorGUILayout.Separator();
            EditorGUILayout.Separator();

            GuiHelpers.DrawContextualHelpBox("The \"Enable Shadows\" parameter allows you to compute the light's shadows (if enabled) in the system.");
            GuiHelpers.DrawToggleChecker(ref _useShadowsProperty, "Enable Shadows");

            EditorGUILayout.Separator();
            EditorGUILayout.Separator();

            GuiHelpers.DrawContextualHelpBox("The \"Enable Cookie\" parameter allows you to compute the light's cookie (if enabled) in the system.");
            //EditorGUI.BeginDisabledGroup(!_component.CastsCookie);
            GuiHelpers.DrawToggleChecker(ref _useCookieProperty, "Enable Cookie");
            //EditorGUI.EndDisabledGroup();

            EditorGUILayout.Separator();
            EditorGUILayout.Separator();

            GuiHelpers.DrawContextualHelpBox("The \"Override Color\" parameter allows you to replace the light's color in the system.");
            GuiHelpers.DrawToggleChecker(ref _overrideColorProperty, "Override Color");
            if (_overrideColorProperty.boolValue)
            {
                //EditorGUI.BeginDisabledGroup(!_overrideColorProperty.boolValue);
                EditorGUILayout.BeginVertical();
                GuiHelpers.DrawContextualHelpBox("The \"Overriding Color\" is the color that will replace the light's color in the system.");
                EditorGUILayout.PropertyField(_overridingColorProperty);
                EditorGUILayout.EndVertical();
                //EditorGUI.EndDisabledGroup();
            }

            EditorGUILayout.Separator();

            GuiHelpers.DrawContextualHelpBox("The \"Scattering Bias\" parameter allows to have more control of how the light will scatter in the environment.");
            EditorGUILayout.BeginHorizontal();
            GUILayout.Label("Scattering Bias", GuiStyles.Label, GUILayout.MaxWidth(160));
            GuiHelpers.DrawSlider(ref _scatteringBiasProperty, -1.0f, 1.0f);
            EditorGUILayout.EndHorizontal();

            EditorGUILayout.Separator();

            EditorGUILayout.EndVertical();
        }
예제 #4
0
        /// <summary>
        /// Displays the common parameters tab
        /// </summary>
        private void DisplaySettingsArea()
        {
            EditorGUILayout.BeginVertical(GuiStyles.ButtonNoHover);

            EditorGUILayout.Separator();
            GUILayout.Label(_settingsTitleContent, new GUIStyle(GuiStyles.LabelBoldCenteredBig)
            {
                fontSize = 15
            });
            EditorGUILayout.Separator();

            ShadowCastingMode shadowCastingMode = (ShadowCastingMode)_shadowCastingModeProperty.enumValueIndex;
            bool castShadow = shadowCastingMode != ShadowCastingMode.Off;

            EditorGUI.BeginChangeCheck();

            castShadow = GuiHelpers.DrawToggleChecker(castShadow, "Cast Shadows");
            if (EditorGUI.EndChangeCheck())
            {
                if (castShadow)
                {
                    _shadowCastingModeProperty.enumValueIndex = (int)ShadowCastingMode.TwoSided;
                }
                else
                {
                    _shadowCastingModeProperty.enumValueIndex = (int)ShadowCastingMode.Off;
                }
            }

            EditorGUILayout.Separator();
            EditorGUILayout.Separator();

            GuiHelpers.DrawToggleChecker(ref _receiveShadowsProperty, "Receive Shadows");

            EditorGUILayout.Separator();
            EditorGUILayout.Separator();

            if (GUILayout.Button("Set Lit Shader", GuiStyles.Button))
            {
                _component.SetLitShader();
            }

            EditorGUILayout.Separator();

            if (GUILayout.Button("Set Unlit Shader", GuiStyles.Button))
            {
                _component.SetUnlitShader();
            }

            EditorGUILayout.Separator();

            EditorGUILayout.EndVertical();
        }
예제 #5
0
 /// <summary>
 /// Displays Ambient Lighting Injection area
 /// </summary>
 private void DisplayAmbientInjectionArea()
 {
     EditorGUILayout.BeginVertical(GuiStyles.Background);
     GuiHelpers.DrawToggleChecker(ref _ambientInjectionBoolProperty, _ambientInjectionTitleContent, true, true);
     if (_ambientInjectionBoolProperty.boolValue)
     {
         EditorGUILayout.BeginVertical(GuiStyles.EmptyMiddleAligned);
         GuiHelpers.DrawInjectionField(ref _ambientInjectionParametersProperty, _noiseMaskBoolProperty.boolValue, _currentVolume.UsesTexture2DMasking, _currentVolume.UsesTexture3DMasking);
         EditorGUILayout.Separator();
         EditorGUILayout.EndVertical();
     }
     EditorGUILayout.EndVertical();
 }
예제 #6
0
 /// <summary>
 /// Displays Tint Injection area
 /// </summary>
 private void DisplayTintInjectionArea()
 {
     EditorGUILayout.BeginVertical(GuiStyles.Background);
     GuiHelpers.DrawToggleChecker(ref _tintInjectionBoolProperty, _tintInjectionTitleContent, true, true);
     if (_tintInjectionBoolProperty.boolValue)
     {
         EditorGUILayout.BeginVertical(GuiStyles.EmptyMiddleAligned);
         EditorGUILayout.PropertyField(_tintInjectionColorProperty);
         GuiHelpers.DrawInjectionField(ref _tintInjectionParametersProperty, _noiseMaskBoolProperty.boolValue, _currentVolume.UsesTexture2DMasking, _currentVolume.UsesTexture3DMasking, true, 0, 1, true, "Brightness", "Brightness of the tinting color");
         EditorGUILayout.Separator();
         EditorGUILayout.EndVertical();
     }
     EditorGUILayout.EndVertical();
 }
예제 #7
0
 /// <summary>
 /// Displays Light Probes settings area
 /// </summary>
 private void DisplayLightProbesLightingInjectionArea()
 {
     EditorGUILayout.BeginVertical(GuiStyles.Background);
     GuiHelpers.DrawContextualHelpBox("These parameters allow to enable the volume to inject the baked light probes illumination and tweak the strength of the injection.");
     GuiHelpers.DrawToggleChecker(ref _useAsLightProbesProxyVolumeProperty, new GUIContent("Light Probes Lighting", Aura.ResourcesCollection.lightProbesIconTexture), true, true);
     if (_useAsLightProbesProxyVolumeProperty.boolValue)
     {
         GUILayout.Label(new GUIContent(" Experimental Feature (PREVIEW)", Aura.ResourcesCollection.experimentalIconTexture), GuiStyles.LabelBoldCentered);
         //EditorGUI.BeginDisabledGroup(!_useAsLightProbesProxyVolumeProperty.boolValue);
         EditorGUILayout.BeginVertical(GuiStyles.EmptyMiddleAligned);
         GuiHelpers.DrawPositiveOnlyFloatField(ref _lightProbesMultiplierProperty, new GUIContent("Strength", "Multiplies the injected lighting"));
         EditorGUILayout.EndVertical();
         //EditorGUI.EndDisabledGroup();
     }
     EditorGUILayout.EndVertical();
 }
예제 #8
0
 /// <summary>
 /// Displays Scattering Injection area
 /// </summary>
 private void DisplayScatteringInjectionArea()
 {
     EditorGUILayout.BeginVertical(GuiStyles.Background);
     GuiHelpers.DrawContextualHelpBox("The \"Scattering Injection\" parameters allows you to add/remove scattering inside the system.\n\nIn other words, you will be able to modify how light from light sources will bounce inside the micro particles and will be deviated by them. Typically, how \"wet\" the micro particles are.\n TIP :The \"Strength\" parameter will accept negative values. Meaning that you will be able to remove scattering as well.");
     GuiHelpers.DrawToggleChecker(ref _scatteringInjectionBoolProperty, _scatteringInjectionTitleContent, true, true);
     if (_scatteringInjectionBoolProperty.boolValue)
     {
         //EditorGUI.BeginDisabledGroup(!_scatteringInjectionBoolProperty.boolValue);
         EditorGUILayout.BeginVertical(GuiStyles.EmptyMiddleAligned);
         GuiHelpers.DrawInjectionField(ref _scatteringInjectionParametersProperty, _noiseMaskBoolProperty.boolValue, _currentVolume.UsesTexture2DMasking, _currentVolume.UsesTexture3DMasking);
         EditorGUILayout.Separator();
         EditorGUILayout.EndVertical();
         //EditorGUI.EndDisabledGroup();
     }
     EditorGUILayout.EndVertical();
 }
예제 #9
0
 /// <summary>
 /// Displays Light Injection area
 /// </summary>
 private void DisplayLightInjectionArea()
 {
     EditorGUILayout.BeginVertical(GuiStyles.Background);
     GuiHelpers.DrawContextualHelpBox("The \"Light Injection\" parameters allows you to add/remove color inside the system.\n\nIn other words, you will be able to add/remove light inside a defined area.\n TIP :The \"Strength\" parameter will accept negative values. Meaning that you will be able to remove Color.");
     GuiHelpers.DrawToggleChecker(ref _lightInjectionBoolProperty, _lightInjectionTitleContent, true, true);
     if (_lightInjectionBoolProperty.boolValue)
     {
         //EditorGUI.BeginDisabledGroup(!_lightInjectionBoolProperty.boolValue);
         EditorGUILayout.BeginVertical(GuiStyles.EmptyMiddleAligned);
         EditorGUILayout.PropertyField(_lightInjectionColorProperty);
         GuiHelpers.DrawInjectionField(ref _lightInjectionParametersProperty, _noiseMaskBoolProperty.boolValue, _currentVolume.UsesTexture2DMasking, _currentVolume.UsesTexture3DMasking);
         EditorGUILayout.Separator();
         EditorGUILayout.EndVertical();
         //EditorGUI.EndDisabledGroup();
     }
     EditorGUILayout.EndVertical();
 }
예제 #10
0
 /// <summary>
 /// Displays Noise Mask Area
 /// </summary>
 private void DisplayNoiseMaskArea()
 {
     EditorGUILayout.BeginVertical(GuiStyles.Background);
     GuiHelpers.DrawContextualHelpBox("The \"Noise Mask\" parameter allows you to assign a dynamic morphing noise mask to the volume.\nThis noise will be used for masking the data injected.");
     GuiHelpers.DrawToggleChecker(ref _noiseMaskBoolProperty, new GUIContent("Noise Mask", Aura.ResourcesCollection.noiseIconTexture), true, true);
     if (_noiseMaskBoolProperty.boolValue)
     {
         //EditorGUI.BeginDisabledGroup(!_noiseMaskBoolProperty.boolValue);
         EditorGUILayout.BeginVertical(GuiStyles.EmptyMiddleAligned);
         GuiHelpers.DrawFloatField(ref _noiseMaskSpeedProperty, new GUIContent("Speed", "Speed of the morph"));
         EditorGUILayout.Separator();
         EditorGUILayout.Separator();
         GuiHelpers.DrawTransformField(ref _noiseMaskTransformProperty);
         EditorGUILayout.EndVertical();
         //EditorGUI.EndDisabledGroup();
     }
     EditorGUILayout.EndVertical();
 }
예제 #11
0
        /// <summary>
        /// Draws the settings area
        /// </summary>
        private void DisplayEditionSettingsArea()
        {
            EditorGUILayout.BeginVertical(GuiStyles.Background);
            GUILayout.Label(new GUIContent(" Edition Settings", Aura.ResourcesCollection.settingsIconTexture), GuiStyles.LabelBoldCenteredBig);
            EditorGUILayout.Separator();
            EditorGUI.BeginChangeCheck();
            AuraEditorPrefs.DisplayCameraSlicesInEdition = GuiHelpers.DrawToggleChecker(AuraEditorPrefs.DisplayCameraSlicesInEdition, " Show slices on Cameras when selected");
            if (EditorGUI.EndChangeCheck())
            {
                SceneView.RepaintAll();
            }
            EditorGUILayout.Separator();
            //EditorGUI.BeginChangeCheck();
            EditorGUI.BeginDisabledGroup(true);
            GuiHelpers.DrawToggleChecker(AuraEditorPrefs.DisplayAuraGuiInParentComponents, " Display Aura buttons in Camera/Light components");
            EditorGUI.EndDisabledGroup();
            //if (EditorGUI.EndChangeCheck())
            //{
            //    AuraEditorPrefs.DisplayAuraGuiInParentComponents = !AuraEditorPrefs.DisplayAuraGuiInParentComponents;
            //}
            EditorGUILayout.Separator();
            EditorGUI.BeginChangeCheck();
            GuiHelpers.DrawToggleChecker(AuraEditorPrefs.DisplayGizmosOnCameras, " Display gizmos on Cameras");
            if (EditorGUI.EndChangeCheck())
            {
                AuraEditorPrefs.DisplayGizmosOnCameras = !AuraEditorPrefs.DisplayGizmosOnCameras;
            }
            EditorGUILayout.Separator();
            EditorGUI.BeginChangeCheck();
            GuiHelpers.DrawToggleChecker(AuraEditorPrefs.DisplayGizmosOnLights, " Display gizmos on Lights");
            if (EditorGUI.EndChangeCheck())
            {
                AuraEditorPrefs.DisplayGizmosOnLights = !AuraEditorPrefs.DisplayGizmosOnLights;
            }
            EditorGUILayout.Separator();
            EditorGUI.BeginChangeCheck();
            GuiHelpers.DrawToggleChecker(AuraEditorPrefs.DisplayGizmosOnVolumes, " Display gizmos on Volumes");
            if (EditorGUI.EndChangeCheck())
            {
                AuraEditorPrefs.DisplayGizmosOnVolumes = !AuraEditorPrefs.DisplayGizmosOnVolumes;
            }
            EditorGUILayout.Separator();
            EditorGUI.BeginChangeCheck();
            GuiHelpers.DrawToggleChecker(AuraEditorPrefs.DisplayGizmosWhenSelected, " Display gizmos when objects are selected");
            if (EditorGUI.EndChangeCheck())
            {
                AuraEditorPrefs.DisplayGizmosWhenSelected = !AuraEditorPrefs.DisplayGizmosWhenSelected;
            }
            EditorGUILayout.Separator();
            EditorGUI.BeginChangeCheck();
            GuiHelpers.DrawToggleChecker(AuraEditorPrefs.DisplayGizmosWhenUnselected, " Display gizmos when objects are unselected");
            if (EditorGUI.EndChangeCheck())
            {
                AuraEditorPrefs.DisplayGizmosWhenUnselected = !AuraEditorPrefs.DisplayGizmosWhenUnselected;
            }
            EditorGUILayout.Separator();
            EditorGUI.BeginChangeCheck();
            GuiHelpers.DrawToggleChecker(AuraEditorPrefs.DisplayButtonsInHierarchy, " Display buttons in the hierarchy");
            if (EditorGUI.EndChangeCheck())
            {
                AuraEditorPrefs.DisplayButtonsInHierarchy = !AuraEditorPrefs.DisplayButtonsInHierarchy;
            }
            EditorGUILayout.EndVertical();

            EditorGUILayout.Separator();
            EditorGUILayout.Separator();
            EditorGUILayout.Separator();

            EditorGUILayout.BeginVertical(GuiStyles.Background);
            GUILayout.Label(new GUIContent(" Toolbox Settings", Aura.ResourcesCollection.debugIconTexture), GuiStyles.LabelBoldCenteredBig);
            EditorGUILayout.Separator();
            EditorGUI.BeginChangeCheck();
            EditorGUI.BeginChangeCheck();
            GuiHelpers.DrawToggleChecker(SceneViewToolbox.IsVisible, " Display Toolbox");
            if (EditorGUI.EndChangeCheck())
            {
                SceneViewToolbox.Display(!SceneViewToolbox.IsVisible);
            }
            EditorGUILayout.Separator();
            EditorGUI.BeginChangeCheck();
            GuiHelpers.DrawToggleChecker(SceneViewToolbox.IsExpanded, " Expand Toolbox");
            if (EditorGUI.EndChangeCheck())
            {
                SceneViewToolbox.Expand(!SceneViewToolbox.IsExpanded);
            }
            EditorGUILayout.Separator();
            EditorGUILayout.Separator();
            EditorGUILayout.BeginHorizontal();
            if (GUILayout.Button("Display Toolbox on Left", AuraEditorPrefs.ToolboxPosition == 0 ? GuiStyles.ButtonPressed : GuiStyles.Button))
            {
                AuraEditorPrefs.ToolboxPosition = 0;
            }
            if (GUILayout.Button("Display Toolbox on Right", AuraEditorPrefs.ToolboxPosition == 1 ? GuiStyles.ButtonPressed : GuiStyles.Button))
            {
                AuraEditorPrefs.ToolboxPosition = 1;
            }
            EditorGUILayout.EndHorizontal();
            EditorGUILayout.Separator();
            EditorGUILayout.Separator();
            AuraEditorPrefs.DisplayDebugPanelInToolbox = GuiHelpers.DrawToggleChecker(AuraEditorPrefs.DisplayDebugPanelInToolbox, " Show DEBUG panel");
            EditorGUILayout.Separator();
            EditorGUI.BeginChangeCheck();
            GuiHelpers.DrawToggleChecker(SceneViewToolbox.DisplayNotifications, " Display Notifications");
            if (EditorGUI.EndChangeCheck())
            {
                SceneViewToolbox.DisplayNotifications = !SceneViewToolbox.DisplayNotifications;
            }
            EditorGUILayout.Separator();
            EditorGUI.BeginChangeCheck();
            GuiHelpers.DrawToggleChecker(SceneViewToolbox.EnableAnimations, " Enable Animations");
            if (EditorGUI.EndChangeCheck())
            {
                SceneViewToolbox.EnableAnimations = !SceneViewToolbox.EnableAnimations;
            }
            EditorGUILayout.Separator();
            EditorGUILayout.Separator();
            EditorGUILayout.BeginHorizontal();
            EditorGUILayout.BeginVertical(GUILayout.MaxWidth(160));
            GUILayout.Space(6);
            GUILayout.Label("Presets Previews Layout", GuiStyles.Label);
            EditorGUILayout.EndVertical();
            if (GUILayout.Button(new GUIContent("List", Aura.ResourcesCollection.listIconTexture), SceneViewToolbox.PresetsPreviewsPerRow == 1 ? GuiStyles.ButtonPressedNoBorder : GuiStyles.ButtonNoBorder))
            {
                SceneViewToolbox.PresetsPreviewsPerRow = 1;
            }
            if (GUILayout.Button(new GUIContent("Grid", Aura.ResourcesCollection.gridIconTexture), SceneViewToolbox.PresetsPreviewsPerRow == 2 ? GuiStyles.ButtonPressedNoBorder : GuiStyles.ButtonNoBorder))
            {
                SceneViewToolbox.PresetsPreviewsPerRow = 2;
            }
            EditorGUILayout.EndHorizontal();
            if (EditorGUI.EndChangeCheck())
            {
                SceneView.RepaintAll();
            }
            EditorGUILayout.Separator();
            EditorGUILayout.EndVertical();

            EditorGUILayout.Separator();
            EditorGUILayout.Separator();
            EditorGUILayout.Separator();

            EditorGUILayout.BeginVertical(GuiStyles.Background);
            GUILayout.Label(new GUIContent(" SceneView Visualization", Aura.ResourcesCollection.cameraIconTexture), GuiStyles.LabelBoldCenteredBig);
            EditorGUILayout.Separator();
            EditorGUI.BeginChangeCheck();

            AuraEditorPrefs.EnableAuraInSceneView = GuiHelpers.DrawToggleChecker(AuraEditorPrefs.EnableAuraInSceneView, "Enable visualization in SceneView");

            EditorGUILayout.Separator();
            GuiHelpers.DrawHelpBox("Enabling Aura in the SceneView may break the SceneView rendering when loading a scene or building player.\n\nTo get the SceneView rendering back, <b>disable then re-enable back</b> post-effects rendering in the toggle dropdown located in the top border of the SceneView.", HelpBoxType.Experimental);
            EditorGUILayout.Separator();

            if (EditorGUI.EndChangeCheck())
            {
                if (AuraEditorPrefs.EnableAuraInSceneView)
                {
                    SceneViewVisualization.EnableAuraInSceneView();
                }
                else
                {
                    SceneViewVisualization.DisableAuraInSceneView();
                }
            }

            EditorGUI.BeginDisabledGroup(!AuraEditorPrefs.EnableAuraInSceneView);
            AuraQualitySettingsEditor.DrawCustomEditor(EditionCameraQualitySettingsObject, null, false, true);
            EditorGUI.EndDisabledGroup();

            EditorGUILayout.Separator();
            EditorGUILayout.EndVertical();

            EditorGUILayout.Separator();
            EditorGUILayout.Separator();
            EditorGUILayout.Separator();

            EditorGUILayout.BeginVertical(GuiStyles.Background);
            GUILayout.Label(new GUIContent(" Introduction Screens", Aura.ResourcesCollection.questionIconTexture), GuiStyles.LabelBoldCenteredBig);
            EditorGUILayout.Separator();
            if (GUILayout.Button("Show Main Introduction Screen", GuiStyles.Button))
            {
                AuraEditorPrefs.DisplayMainIntroductionScreen = true;
                SceneView.RepaintAll();
            }
            EditorGUILayout.Separator();
            EditorGUILayout.Separator();
            if (GUILayout.Button("Show Camera Introduction Screen", GuiStyles.Button))
            {
                AuraEditorPrefs.DisplayCameraIntroductionScreen = true;
                SceneView.RepaintAll();
            }
            EditorGUILayout.Separator();
            EditorGUILayout.Separator();
            if (GUILayout.Button("Show Light Introduction Screen", GuiStyles.Button))
            {
                AuraEditorPrefs.DisplayLightIntroductionScreen = true;
                SceneView.RepaintAll();
            }
            EditorGUILayout.Separator();
            EditorGUILayout.Separator();
            if (GUILayout.Button("Show Volume Introduction Screen", GuiStyles.Button))
            {
                AuraEditorPrefs.DisplayVolumeIntroductionScreen = true;
                SceneView.RepaintAll();
            }
            EditorGUILayout.Separator();
            EditorGUILayout.EndVertical();
        }
예제 #12
0
        /// <summary>
        /// Displays the common parameters tab
        /// </summary>
        private void DisplayCommonSettingsArea()
        {
            EditorGUILayout.BeginVertical(GuiStyles.ButtonNoHover);

            EditorGUILayout.Separator();
            GUILayout.Label(_commonSettingsTitleContent, new GUIStyle(GuiStyles.LabelBoldCenteredBig)
            {
                fontSize = 15
            });
            EditorGUILayout.Separator();

            GuiHelpers.DrawFloatField(ref _strengthProperty, new GUIContent("Strength", "Multiplies the intensity of the light source in the system"));

            EditorGUILayout.Separator();
            EditorGUILayout.Separator();
            EditorGUILayout.Separator();

            EditorGUILayout.PropertyField(_useScatteringProperty);
            if ((BooleanChoice)_useScatteringProperty.enumValueIndex == BooleanChoice.Default || (BooleanChoice)_useScatteringProperty.enumValueIndex == BooleanChoice.True)
            {
                EditorGUILayout.Separator();
                GuiHelpers.DrawToggleChecker(ref _overrideScatteringProperty, "Override Scattering");
                if (_overrideScatteringProperty.boolValue)
                {
                    EditorGUILayout.BeginVertical();
                    EditorGUILayout.PropertyField(_overridingScatteringProperty);
                    EditorGUILayout.EndVertical();
                }
            }

            EditorGUILayout.Separator();
            EditorGUILayout.Separator();
            EditorGUILayout.Separator();

            GuiHelpers.DrawContextualHelpBox("The \"Enable Shadows\" parameter allows you to compute the light's shadows (if enabled) in the system.");
            GuiHelpers.DrawToggleChecker(ref _useShadowsProperty, "Enable Shadows");

            EditorGUILayout.Separator();
            EditorGUILayout.Separator();

            GuiHelpers.DrawContextualHelpBox("The \"Enable Cookie\" parameter allows you to compute the light's cookie (if enabled) in the system.");
            //EditorGUI.BeginDisabledGroup(!_component.CastsCookie);
            GuiHelpers.DrawToggleChecker(ref _useCookieProperty, "Enable Cookie");
            //EditorGUI.EndDisabledGroup();

            EditorGUILayout.Separator();
            EditorGUILayout.Separator();
            EditorGUILayout.Separator();

            GuiHelpers.DrawContextualHelpBox("The \"Override Color\" parameter allows you to replace the light's color in the system.");
            GuiHelpers.DrawToggleChecker(ref _overrideColorProperty, "Override Color");
            if (_overrideColorProperty.boolValue)
            {
                //EditorGUI.BeginDisabledGroup(!_overrideColorProperty.boolValue);
                EditorGUILayout.BeginVertical();
                GuiHelpers.DrawContextualHelpBox("The \"Overriding Color\" is the color that will replace the light's color in the system.");
                EditorGUILayout.PropertyField(_overridingColorProperty);
                EditorGUILayout.EndVertical();
                //EditorGUI.EndDisabledGroup();
            }

            if (LightHelpers.IsColorTemperatureAvailable)
            {
                EditorGUILayout.Separator();
                EditorGUILayout.Separator();
                EditorGUILayout.Separator();

                GuiHelpers.DrawHelpBox("Unity currently gives no way to know if the color temperature mode is enabled on the light, therefore you need to manually enable it here under.", HelpBoxType.Warning);
                EditorGUILayout.Separator();
                GuiHelpers.DrawToggleChecker(ref _useColorTemperatureTintProperty, "Use Color Temperature Tint");
            }

            EditorGUILayout.Separator();

            EditorGUILayout.EndVertical();
        }
예제 #13
0
        /// <summary>
        /// Draws the field required to draw a VolumeInjectionParameters object
        /// </summary>
        /// <param name="injectionProperty">The related serialized property</param>
        /// <param name="displayMask">Int mask to display texture/noise mask</param>
        public static void DrawInjectionField(ref SerializedProperty injectionProperty, bool displayNoiseParameters, bool displayTexture2DMaskParameters, bool displayTexture3DMaskParameters)
        {
            SerializedProperty strengthProperty = injectionProperty.FindPropertyRelative("strength");

            DrawFloatField(ref strengthProperty, new GUIContent("Strength", "Strength of the injected data. Can be set negative to remove data."));

            if (displayNoiseParameters)
            {
                //EditorGUI.BeginDisabledGroup(!displayNoiseParameters);
                EditorGUILayout.Separator();
                EditorGUILayout.Separator();
                SerializedProperty useNoiseMask = injectionProperty.FindPropertyRelative("useNoiseMask");
                GuiHelpers.DrawToggleChecker(ref useNoiseMask, "Use Noise Mask", true);
                if (useNoiseMask.boolValue)
                {
                    EditorGUILayout.Separator();
                    EditorGUILayout.BeginHorizontal();
                    EditorGUILayout.BeginVertical(GUILayout.Width(4));
                    GUILayout.Label("");
                    EditorGUILayout.EndVertical();
                    EditorGUILayout.BeginVertical();
                    SerializedProperty useNoiseMaskLevels = injectionProperty.FindPropertyRelative("useNoiseMaskLevels");
                    GuiHelpers.DrawToggleChecker(ref useNoiseMaskLevels, "Levels");
                    if (useNoiseMaskLevels.boolValue)
                    {
                        EditorGUILayout.Separator();
                        //EditorGUI.BeginDisabledGroup(!useNoiseMaskLevels.boolValue);
                        SerializedProperty noiseMaskLevelsProperty = injectionProperty.FindPropertyRelative("noiseMaskLevelParameters");
                        GuiHelpers.DrawLevelsField(ref noiseMaskLevelsProperty);
                        //EditorGUI.EndDisabledGroup();
                    }
                    EditorGUILayout.EndVertical();
                    EditorGUILayout.EndHorizontal();
                }
                //EditorGUI.EndDisabledGroup();
            }

            if (displayTexture2DMaskParameters)
            {
                //EditorGUI.BeginDisabledGroup(!displayTexture2DMaskParameters);
                EditorGUILayout.Separator();
                EditorGUILayout.Separator();
                SerializedProperty useTexture2DMask = injectionProperty.FindPropertyRelative("useTexture2DMask");
                GuiHelpers.DrawToggleChecker(ref useTexture2DMask, "Use Texture2D Mask", true);
                if (useTexture2DMask.boolValue)
                {
                    EditorGUILayout.Separator();
                    EditorGUILayout.BeginHorizontal();
                    EditorGUILayout.BeginVertical(GUILayout.Width(4));
                    GUILayout.Label("");
                    EditorGUILayout.EndVertical();
                    EditorGUILayout.BeginVertical();
                    SerializedProperty useTexture2DMaskLevels = injectionProperty.FindPropertyRelative("useTexture2DMaskLevels");
                    GuiHelpers.DrawToggleChecker(ref useTexture2DMaskLevels, "Levels");
                    if (useTexture2DMaskLevels.boolValue)
                    {
                        EditorGUILayout.Separator();
                        //EditorGUI.BeginDisabledGroup(!useTexture2DMaskLevels.boolValue);
                        SerializedProperty texture2DMaskLevelsProperty = injectionProperty.FindPropertyRelative("texture2DMaskLevelParameters");
                        GuiHelpers.DrawLevelsField(ref texture2DMaskLevelsProperty);
                        //EditorGUI.EndDisabledGroup();
                    }
                    EditorGUILayout.EndVertical();
                    EditorGUILayout.EndHorizontal();
                }
                //EditorGUI.EndDisabledGroup();
            }

            if (displayTexture3DMaskParameters)
            {
                //EditorGUI.BeginDisabledGroup(!displayTexture3DMaskParameters);
                EditorGUILayout.Separator();
                EditorGUILayout.Separator();
                SerializedProperty useTexture3DMask = injectionProperty.FindPropertyRelative("useTexture3DMask");
                GuiHelpers.DrawToggleChecker(ref useTexture3DMask, "Texture3D Mask Levels", true);
                if (useTexture3DMask.boolValue)
                {
                    EditorGUILayout.Separator();
                    EditorGUILayout.BeginHorizontal();
                    EditorGUILayout.BeginVertical(GUILayout.Width(4));
                    GUILayout.Label("");
                    EditorGUILayout.EndVertical();
                    EditorGUILayout.BeginVertical();
                    SerializedProperty useTexture3DMaskLevels = injectionProperty.FindPropertyRelative("useTexture3DMaskLevels");
                    GuiHelpers.DrawToggleChecker(ref useTexture3DMaskLevels, "Levels");
                    if (useTexture3DMaskLevels.boolValue)
                    {
                        EditorGUILayout.Separator();
                        //EditorGUI.BeginDisabledGroup(!useTexture3DMaskLevels.boolValue);
                        SerializedProperty texture3DMaskLevelsProperty = injectionProperty.FindPropertyRelative("texture3DMaskLevelParameters");
                        GuiHelpers.DrawLevelsField(ref texture3DMaskLevelsProperty);
                        //EditorGUI.EndDisabledGroup();
                    }
                    EditorGUILayout.EndVertical();
                    EditorGUILayout.EndHorizontal();
                }
                //EditorGUI.EndDisabledGroup();
            }
        }
예제 #14
0
        /// <summary>
        /// Displays the content of the settings tab
        /// </summary>
        private static void DisplaySettingsArea(SerializedObject serializedObject, AuraCamera auraComponent)
        {
            EditorGUILayout.BeginVertical(GuiStyles.Background);

            EditorGUILayout.BeginVertical(GuiStyles.ButtonNoHover);

            EditorGUILayout.Separator();
            GUILayout.Label(new GUIContent(" Debug", Aura.ResourcesCollection.debugIconTexture), GuiStyles.LabelBoldCenteredBig);
            EditorGUILayout.Separator();

            GuiHelpers.DrawToggleChecker(ref _debugVolumetricLightingProperty, "Display Volumetric Lighting Only");

            EditorGUILayout.Separator();

            GuiHelpers.DrawToggleChecker(ref _debugOcclusionCullingProperty, "Display Occlusion Miss");

            EditorGUILayout.Separator();
            EditorGUILayout.Separator();

            EditorGUILayout.EndVertical();

            EditorGUILayout.Separator();
            EditorGUILayout.Separator();
            EditorGUILayout.Separator();

            EditorGUILayout.BeginVertical(GuiStyles.ButtonNoHover);

            EditorGUILayout.Separator();
            GUILayout.Label(new GUIContent(" Grid", Aura.ResourcesCollection.gridIconTexture), GuiStyles.LabelBoldCenteredBig);
            EditorGUILayout.Separator();

            GuiHelpers.DrawContextualHelpBox("The \"Grid\" parameters allow you to determine the density of cells used to compute the volumetric lighting.\n\nThis cubic grid will be remapped on the frustum (the volume visible to the camera) and will range from the camera's near clip distance to the \"Range\" distance parameter (for performance saving and because behind a certain distance, changes are barely noticeable).");

            EditorGUILayout.Separator();
            EditorGUILayout.Separator();

            EditorGUILayout.BeginVertical();
            if (!IsEditionQualitySettings)
            {
                _frustumGridResolutionProperty.FindPropertyRelative("x").intValue = Mathf.Max(8, EditorGUILayout.IntField("Horizontal", _frustumGridResolutionProperty.FindPropertyRelative("x").intValue));
                _frustumGridResolutionProperty.FindPropertyRelative("y").intValue = Mathf.Max(8, EditorGUILayout.IntField("Vertical", _frustumGridResolutionProperty.FindPropertyRelative("y").intValue));
                _frustumGridResolutionProperty.FindPropertyRelative("z").intValue = Mathf.Max(8, EditorGUILayout.IntField("Depth", _frustumGridResolutionProperty.FindPropertyRelative("z").intValue));
                EditorGUILayout.Separator();
                if (GUILayout.Button("Set Resolution", GuiStyles.ButtonBold))
                {
                    //if (IsEditionQualitySettings)
                    //{
                    //    SceneViewVisualization.SetSceneViewVisualizationFrustumGridResolution(_frustumGridResolutionProperty.vector3IntValue);
                    //}
                    //else
                    {
                        _current.SetFrustumGridResolution(_frustumGridResolutionProperty.vector3IntValue);
                    }
                }

                EditorGUILayout.Separator();
                EditorGUILayout.Separator();

                GuiHelpers.DrawToggleChecker(ref _enableAutomaticStereoResizingProperty, new GUIContent("Resize Automatically In Stereo Mode", "Enables the automatic horizontal resizing of the frustum grid resolution when the camera is running in stereo mode\n(halved size for MultiPass, doubled size for SinglePass)"));

                EditorGUILayout.Separator();
                EditorGUILayout.Separator();
            }
            else
            {
                GuiHelpers.DrawHelpBox("Custom grid resolution in SceneView is not currently available", HelpBoxType.Experimental);
                EditorGUILayout.Separator();
                EditorGUILayout.Separator();
            }

            GuiHelpers.DrawPositiveOnlyFloatField(ref _gridSettingsFarPlaneProperty, "Range");
            if (auraComponent != null && _gridSettingsFarPlaneProperty.floatValue < auraComponent.CameraComponent.nearClipPlane)
            {
                GuiHelpers.DrawHelpBox("Range must be bigger than 0", HelpBoxType.Warning);
            }

            EditorGUILayout.Separator();

            GuiHelpers.DrawSlider(ref _depthBiasCoefficientProperty, 0, 1, "Depth Bias", true);

            EditorGUILayout.Separator();
            EditorGUILayout.Separator();

            GuiHelpers.DrawContextualHelpBox("The \"Occlusion Culling\" allows to compute the maximum visible depth of the frustum grid.\n\nThis leads to avoid computing cells that are invisible to the camera because hidden behind objects.");
            GuiHelpers.DrawToggleChecker(ref _enableOcclusionCullingProperty, "Enable Occlusion Culling");
            EditorGUI.BeginDisabledGroup(!_enableOcclusionCullingProperty.boolValue);
            EditorGUILayout.BeginVertical(GuiStyles.EmptyMiddleAligned);
            EditorGUILayout.PropertyField(_occlusionCullingAccuracyProperty, new GUIContent("Accuracy"));
            EditorGUILayout.EndVertical();
            EditorGUI.EndDisabledGroup();

            EditorGUILayout.Separator();
            EditorGUILayout.Separator();

            EditorGUILayout.EndVertical();

            EditorGUILayout.EndVertical();

            EditorGUILayout.Separator();
            EditorGUILayout.Separator();
            EditorGUILayout.Separator();

            EditorGUILayout.BeginVertical(GuiStyles.ButtonNoHover);

            EditorGUILayout.Separator();
            GUILayout.Label(new GUIContent(" Filtering", Aura.ResourcesCollection.cameraIconTexture), GuiStyles.LabelBoldCenteredBig);
            EditorGUILayout.Separator();

            GuiHelpers.DrawContextualHelpBox("These parameters allow to configure the filtering of the volumetric data.");

            EditorGUILayout.Separator();
            EditorGUILayout.Separator();

            EditorGUILayout.BeginVertical();
            GuiHelpers.DrawToggleChecker(ref _enableDitheringProperty, "Enable Color Dithering");

            EditorGUILayout.Separator();
            EditorGUILayout.Separator();
            EditorGUILayout.Separator();

            EditorGUILayout.PropertyField(_texture3DFilteringProperty, new GUIContent("Texture3D Filtering"));

            EditorGUILayout.Separator();
            EditorGUILayout.Separator();
            EditorGUILayout.Separator();

            GuiHelpers.DrawContextualHelpBox("The \"Reprojection\" allows to blend the current (jittered) computed frame with the previous one.\n\nThis leads to a smoother volumetric lighting, especially with a low resolution grid.");
            GuiHelpers.DrawToggleChecker(ref _enableTemporalReprojectionProperty, "Enable Reprojection");
            EditorGUI.BeginDisabledGroup(!_enableTemporalReprojectionProperty.boolValue);
            EditorGUILayout.BeginVertical(GuiStyles.EmptyMiddleAligned);
            GuiHelpers.DrawSlider(ref _temporalReprojectionFactorProperty, 0, 1, "Reprojector factor");
            EditorGUILayout.EndVertical();
            EditorGUI.EndDisabledGroup();

            EditorGUILayout.Separator();

            EditorGUILayout.EndVertical();
            EditorGUILayout.EndVertical();

            EditorGUILayout.Separator();
            EditorGUILayout.Separator();
            EditorGUILayout.Separator();

            EditorGUILayout.BeginVertical(GuiStyles.ButtonNoHover);

            EditorGUILayout.Separator();
            GUILayout.Label(new GUIContent(" Options", Aura.ResourcesCollection.optionsIconTexture), GuiStyles.LabelBoldCenteredBig);
            EditorGUILayout.Separator();

            GuiHelpers.DrawContextualHelpBox("These parameters allow you to enable/disable some options.\n\nNote that the existence of the different contributions are handled by the system at runtime.");

            EditorGUILayout.Separator();
            EditorGUILayout.Separator();

            EditorGUILayout.BeginVertical();

            GuiHelpers.DrawToggleChecker(ref _enableAmbientLightingProperty, "Enable Ambient Lighting");

            EditorGUILayout.Separator();
            EditorGUILayout.Separator();

            GuiHelpers.DrawToggleChecker(ref _enableVolumesProperty, "Enable Volumes");
            EditorGUI.BeginDisabledGroup(!_enableVolumesProperty.boolValue);
            EditorGUILayout.BeginVertical(GuiStyles.EmptyMiddleAligned);
            GuiHelpers.DrawToggleChecker(ref _enableVolumesNoiseMaskProperty, "Enable Noise Masks");
            EditorGUILayout.Separator();
            GuiHelpers.DrawToggleChecker(ref _enableVolumesTexture2DMaskProperty, "Enable Texture2D Masks");
            EditorGUILayout.Separator();
            GuiHelpers.DrawToggleChecker(ref _enableVolumesTexture3DMaskProperty, "Enable Texture3D Masks");
            EditorGUILayout.EndVertical();
            EditorGUI.EndDisabledGroup();

            EditorGUILayout.Separator();
            EditorGUILayout.Separator();

            GuiHelpers.DrawToggleChecker(ref _enableDirectionalLightsProperty, "Enable Directional Lights");
            EditorGUI.BeginDisabledGroup(!_enableDirectionalLightsProperty.boolValue);
            EditorGUILayout.BeginVertical(GuiStyles.EmptyMiddleAligned);
            GuiHelpers.DrawToggleChecker(ref _enableDirectionalLightsShadowsProperty, "Enable Shadows");
            EditorGUILayout.EndVertical();
            EditorGUI.EndDisabledGroup();

            EditorGUILayout.Separator();
            EditorGUILayout.Separator();

            GuiHelpers.DrawToggleChecker(ref _enableSpotLightsProperty, "Enable Spot Lights");
            EditorGUI.BeginDisabledGroup(!_enableSpotLightsProperty.boolValue);
            EditorGUILayout.BeginVertical(GuiStyles.EmptyMiddleAligned);
            GuiHelpers.DrawToggleChecker(ref _enableSpotLightsShadowsProperty, "Enable Shadows");
            EditorGUILayout.EndVertical();
            EditorGUI.EndDisabledGroup();

            EditorGUILayout.Separator();
            EditorGUILayout.Separator();

            GuiHelpers.DrawToggleChecker(ref _enablePointLightsProperty, "Enable Point Lights");
            EditorGUI.BeginDisabledGroup(!_enablePointLightsProperty.boolValue);
            EditorGUILayout.BeginVertical(GuiStyles.EmptyMiddleAligned);
            GuiHelpers.DrawToggleChecker(ref _enablePointLightsShadowsProperty, "Enable Shadows");
            EditorGUILayout.EndVertical();
            EditorGUI.EndDisabledGroup();

            EditorGUILayout.Separator();
            EditorGUILayout.Separator();

            EditorGUI.BeginDisabledGroup(!_enableSpotLightsProperty.boolValue && !_enableSpotLightsProperty.boolValue && !_enableDirectionalLightsProperty.boolValue);
            GuiHelpers.DrawToggleChecker(ref _enableLightsCookiesProperty, "Enable Cookies");
            EditorGUI.EndDisabledGroup();

            EditorGUILayout.Separator();

            EditorGUILayout.EndVertical();

            EditorGUILayout.EndVertical();

            EditorGUILayout.Separator();
            EditorGUILayout.Separator();
            EditorGUILayout.Separator();

            EditorGUILayout.BeginVertical(GuiStyles.ButtonNoHover);

            EditorGUILayout.Separator();
            GUILayout.Label(new GUIContent(" Experimental Features", Aura.ResourcesCollection.experimentalIconTexture), GuiStyles.LabelBoldCenteredBig);
            EditorGUILayout.Separator();

            GuiHelpers.DrawHelpBox("These features are still under active development.\nThey might currently lead to visual/performance issues.", HelpBoxType.Experimental);

            EditorGUILayout.Separator();
            EditorGUILayout.Separator();

            GuiHelpers.DrawToggleChecker(ref _enableDenoisingFilterProperty, "Enable Denoising Filter");
            EditorGUI.BeginDisabledGroup(!_enableDenoisingFilterProperty.boolValue);
            EditorGUILayout.BeginVertical(GuiStyles.EmptyMiddleAligned);
            EditorGUILayout.PropertyField(_denoisingFilterRangeProperty, new GUIContent("Range"));
            EditorGUILayout.EndVertical();
            EditorGUI.EndDisabledGroup();

            EditorGUILayout.Separator();
            EditorGUILayout.Separator();

            GuiHelpers.DrawToggleChecker(ref _enableBlurFilterProperty, "Enable Blur Filter");
            EditorGUI.BeginDisabledGroup(!_enableBlurFilterProperty.boolValue);
            EditorGUILayout.BeginVertical(GuiStyles.EmptyMiddleAligned);
            EditorGUILayout.PropertyField(_blurFilterRangeProperty, new GUIContent("Range"));
            EditorGUILayout.PropertyField(_blurFilterTypeProperty, new GUIContent("Type"));
            if ((BlurFilterType)_blurFilterTypeProperty.enumValueIndex == BlurFilterType.Gaussian)
            {
                GuiHelpers.DrawSlider(ref _blurFilterGaussianDeviationProperty, 0.0f, 0.01f, "Lobe Bulge");
            }
            EditorGUILayout.EndVertical();
            EditorGUI.EndDisabledGroup();

            EditorGUILayout.Separator();
            EditorGUILayout.Separator();

            EditorGUILayout.BeginVertical();

            GuiHelpers.DrawContextualHelpBox("The \"Light Probes\" allows to compute the world space light probes' data and inject it as contributing light in the volumetric lighting system.");
            GuiHelpers.DrawToggleChecker(ref _enableLightProbesProperty, "Enable Light Probes");
            //if(!IsEditionQualitySettings)
            //{
            //    EditorGUI.BeginDisabledGroup(!_enableLightProbesProperty.boolValue);
            //    EditorGUILayout.BeginVertical(GuiStyles.EmptyMiddleAligned);
            //    _lightProbesProxyGridResolutionProperty.FindPropertyRelative("x").intValue = Mathf.Max(2, EditorGUILayout.IntField("Horizontal", _lightProbesProxyGridResolutionProperty.FindPropertyRelative("x").intValue));
            //    _lightProbesProxyGridResolutionProperty.FindPropertyRelative("y").intValue = Mathf.Max(2, EditorGUILayout.IntField("Vertical", _lightProbesProxyGridResolutionProperty.FindPropertyRelative("y").intValue));
            //    _lightProbesProxyGridResolutionProperty.FindPropertyRelative("z").intValue = Mathf.Max(2, EditorGUILayout.IntField("Depth", _lightProbesProxyGridResolutionProperty.FindPropertyRelative("z").intValue));
            //    EditorGUILayout.Separator();
            //    if (GUILayout.Button("Set Resolution", GuiStyles.ButtonNoHover))
            //    {
            //        _current.SetLightProbesProxyGridResolution(_lightProbesProxyGridResolutionProperty.vector3IntValue);
            //    }
            //    EditorGUILayout.EndVertical();
            //    EditorGUI.EndDisabledGroup();
            //}
            EditorGUILayout.Separator();
            EditorGUILayout.EndVertical();

            EditorGUILayout.EndVertical();

            EditorGUILayout.EndVertical();
        }
예제 #15
0
        /// <summary>
        /// Draws the field required to draw a VolumeInjectionParameters object
        /// </summary>
        /// <param name="injectionProperty">The related serialized property</param>
        public static void DrawInjectionField(ref SerializedProperty injectionProperty, bool displayNoiseParameters, bool displayTexture2DMaskParameters, bool displayTexture3DMaskParameters, bool clampStrength = false, float clampStrengthMin = 0.0f, float clampStrengthMax = 1.0f, bool saturateLevelOuput = false, string strengthLabel = "Strength", string strengthTooltip = "Strength of the injected data. Can be set negative to remove data.")
        {
            SerializedProperty strengthProperty = injectionProperty.FindPropertyRelative("strength");
            GUIContent         strengthContent  = new GUIContent(strengthLabel, strengthTooltip);

            if (clampStrength)
            {
                DrawSlider(ref strengthProperty, clampStrengthMin, clampStrengthMax, strengthContent.text);
            }
            else
            {
                DrawFloatField(ref strengthProperty, strengthContent);
            }

            if (displayNoiseParameters)
            {
                //EditorGUI.BeginDisabledGroup(!displayNoiseParameters);
                EditorGUILayout.Separator();
                EditorGUILayout.Separator();
                SerializedProperty useNoiseMask = injectionProperty.FindPropertyRelative("useNoiseMask");
                GuiHelpers.DrawToggleChecker(ref useNoiseMask, "Use Noise Mask", true);
                if (useNoiseMask.boolValue)
                {
                    EditorGUILayout.Separator();
                    EditorGUILayout.BeginHorizontal();
                    EditorGUILayout.BeginVertical(GUILayout.Width(4));
                    GUILayout.Label("");
                    EditorGUILayout.EndVertical();
                    EditorGUILayout.BeginVertical();
                    SerializedProperty useNoiseMaskLevels = injectionProperty.FindPropertyRelative("useNoiseMaskLevels");
                    GuiHelpers.DrawToggleChecker(ref useNoiseMaskLevels, "Levels");
                    if (useNoiseMaskLevels.boolValue)
                    {
                        EditorGUILayout.Separator();
                        //EditorGUI.BeginDisabledGroup(!useNoiseMaskLevels.boolValue);
                        SerializedProperty noiseMaskLevelsProperty = injectionProperty.FindPropertyRelative("noiseMaskLevelParameters");
                        GuiHelpers.DrawLevelsField(ref noiseMaskLevelsProperty, saturateLevelOuput);
                        //EditorGUI.EndDisabledGroup();
                    }
                    EditorGUILayout.EndVertical();
                    EditorGUILayout.EndHorizontal();
                }
                //EditorGUI.EndDisabledGroup();
            }

            if (displayTexture2DMaskParameters)
            {
                //EditorGUI.BeginDisabledGroup(!displayTexture2DMaskParameters);
                EditorGUILayout.Separator();
                EditorGUILayout.Separator();
                SerializedProperty useTexture2DMask = injectionProperty.FindPropertyRelative("useTexture2DMask");
                GuiHelpers.DrawToggleChecker(ref useTexture2DMask, "Use Texture2D Mask", true);
                if (useTexture2DMask.boolValue)
                {
                    EditorGUILayout.Separator();
                    EditorGUILayout.BeginHorizontal();
                    EditorGUILayout.BeginVertical(GUILayout.Width(4));
                    GUILayout.Label("");
                    EditorGUILayout.EndVertical();
                    EditorGUILayout.BeginVertical();
                    SerializedProperty useTexture2DMaskLevels = injectionProperty.FindPropertyRelative("useTexture2DMaskLevels");
                    GuiHelpers.DrawToggleChecker(ref useTexture2DMaskLevels, "Levels");
                    if (useTexture2DMaskLevels.boolValue)
                    {
                        EditorGUILayout.Separator();
                        //EditorGUI.BeginDisabledGroup(!useTexture2DMaskLevels.boolValue);
                        SerializedProperty texture2DMaskLevelsProperty = injectionProperty.FindPropertyRelative("texture2DMaskLevelParameters");
                        GuiHelpers.DrawLevelsField(ref texture2DMaskLevelsProperty, saturateLevelOuput);
                        //EditorGUI.EndDisabledGroup();
                    }
                    EditorGUILayout.EndVertical();
                    EditorGUILayout.EndHorizontal();
                }
                //EditorGUI.EndDisabledGroup();
            }

            if (displayTexture3DMaskParameters)
            {
                //EditorGUI.BeginDisabledGroup(!displayTexture3DMaskParameters);
                EditorGUILayout.Separator();
                EditorGUILayout.Separator();
                SerializedProperty useTexture3DMask = injectionProperty.FindPropertyRelative("useTexture3DMask");
                GuiHelpers.DrawToggleChecker(ref useTexture3DMask, "Texture3D Mask Levels", true);
                if (useTexture3DMask.boolValue)
                {
                    EditorGUILayout.Separator();
                    EditorGUILayout.BeginHorizontal();
                    EditorGUILayout.BeginVertical(GUILayout.Width(4));
                    GUILayout.Label("");
                    EditorGUILayout.EndVertical();
                    EditorGUILayout.BeginVertical();
                    SerializedProperty useTexture3DMaskLevels = injectionProperty.FindPropertyRelative("useTexture3DMaskLevels");
                    GuiHelpers.DrawToggleChecker(ref useTexture3DMaskLevels, "Levels");
                    if (useTexture3DMaskLevels.boolValue)
                    {
                        EditorGUILayout.Separator();
                        //EditorGUI.BeginDisabledGroup(!useTexture3DMaskLevels.boolValue);
                        SerializedProperty texture3DMaskLevelsProperty = injectionProperty.FindPropertyRelative("texture3DMaskLevelParameters");
                        GuiHelpers.DrawLevelsField(ref texture3DMaskLevelsProperty, saturateLevelOuput);
                        //EditorGUI.EndDisabledGroup();
                    }
                    EditorGUILayout.EndVertical();
                    EditorGUILayout.EndHorizontal();
                }
                //EditorGUI.EndDisabledGroup();
            }
        }
예제 #16
0
        /// <summary>
        /// Displays the content of the "World's Primary Injection" tab
        /// </summary>
        private static void DisplayBaseSettingsArea()
        {
            EditorGUILayout.BeginVertical(GuiStyles.Background);

            EditorGUILayout.BeginVertical(GuiStyles.ButtonNoHover);

            EditorGUILayout.Separator();
            GUILayout.Label(new GUIContent(" Global Injection", Aura.ResourcesCollection.injectionIconTexture), GuiStyles.LabelBoldCenteredBig);
            EditorGUILayout.Separator();

            GuiHelpers.DrawContextualHelpBox("These parameters are the ambient Density, Lighting and Scattering, set globally for the whole surrounding environment.");

            EditorGUILayout.Separator();
            EditorGUILayout.Separator();

            EditorGUILayout.BeginVertical();
            GuiHelpers.DrawToggleChecker(ref _useDensityProperty, new GUIContent(" Use Global Density", Aura.ResourcesCollection.densityIconTexture, "Injects an ambient density"), true, true);
            if (_useDensityProperty.boolValue)
            {
                //EditorGUI.BeginDisabledGroup(!_useDensityProperty.boolValue);
                EditorGUILayout.BeginVertical(GuiStyles.EmptyMiddleAligned);
                GuiHelpers.DrawPositiveOnlyFloatField(ref _baseDensityProperty, "Global Density");
                EditorGUILayout.Separator();
                EditorGUILayout.EndVertical();
                //EditorGUI.EndDisabledGroup();
            }

            EditorGUILayout.Separator();
            EditorGUILayout.Separator();

            GuiHelpers.DrawToggleChecker(ref _useScatteringProperty, new GUIContent(" Use Global Scattering", Aura.ResourcesCollection.scatteringIconTexture, "Injects an ambient scattering"), true, true);
            if (_useScatteringProperty.boolValue)
            {
                //EditorGUI.BeginDisabledGroup(!_useScatteringProperty.boolValue);
                EditorGUILayout.BeginVertical(GuiStyles.EmptyMiddleAligned);
                GuiHelpers.DrawSlider(ref _baseScatteringProperty, 0, 1, "Global Scattering");
                EditorGUILayout.Separator();
                EditorGUILayout.EndVertical();
                //EditorGUI.EndDisabledGroup();
            }

            EditorGUILayout.Separator();
            EditorGUILayout.Separator();

            GuiHelpers.DrawToggleChecker(ref _useAmbientLightingProperty, new GUIContent(" Use Ambient Lighting", Aura.ResourcesCollection.illuminationIconTexture, "Injects the \"Environment lighting\" set in the \"Lighting\" window"), true, true);
            if (_useAmbientLightingProperty.boolValue)
            {
                //EditorGUI.BeginDisabledGroup(!_useAmbientLightingProperty.boolValue);
                EditorGUILayout.BeginVertical(GuiStyles.EmptyMiddleAligned);
                GuiHelpers.DrawPositiveOnlyFloatField(ref _ambientLightingStrengthProperty, "Ambient Strength");
                EditorGUILayout.Separator();
                EditorGUILayout.EndVertical();
                //EditorGUI.EndDisabledGroup();
            }

            EditorGUILayout.Separator();
            EditorGUILayout.Separator();

            GuiHelpers.DrawToggleChecker(ref _useColorProperty, new GUIContent(" Use Global Light", Aura.ResourcesCollection.colorIconTexture, "Injects an ambient light"), true, true);
            if (_useColorProperty.boolValue)
            {
                //EditorGUI.BeginDisabledGroup(!_useColorProperty.boolValue);
                EditorGUILayout.BeginVertical(GuiStyles.EmptyMiddleAligned);
                EditorGUILayout.PropertyField(_baseColorProperty);
                GuiHelpers.DrawPositiveOnlyFloatField(ref _baseColorStrengthProperty, "Global Light Strength");
                EditorGUILayout.Separator();
                EditorGUILayout.EndVertical();
                //EditorGUI.EndDisabledGroup();
            }

            EditorGUILayout.Separator();
            EditorGUILayout.Separator();

            GuiHelpers.DrawToggleChecker(ref _useExtinctionProperty, new GUIContent(" Use Extinction", Aura.ResourcesCollection.extinctionIconTexture, "Simulates the depth related decay of light"), true, true);
            if (_useExtinctionProperty.boolValue)
            {
                //EditorGUI.BeginDisabledGroup(!_useExtinctionProperty.boolValue);
                EditorGUILayout.BeginVertical(GuiStyles.EmptyMiddleAligned);
                GuiHelpers.DrawSlider(ref _extinctionProperty, 0, 1, "Global Extinction", true);
                EditorGUILayout.Separator();
                EditorGUILayout.EndVertical();
                //EditorGUI.EndDisabledGroup();
            }

            EditorGUILayout.Separator();
            EditorGUILayout.Separator();

            EditorGUILayout.EndVertical();

            EditorGUILayout.EndVertical();

            EditorGUILayout.EndVertical();
        }