示例#1
0
        /// <summary>
        /// Displays the additional parameters tab for directional lights
        /// </summary>
        private void DisplayDirectionalLightAdditionalSettingsArea()
        {
            EditorGUILayout.BeginVertical(EditorStyles.miniButton);
            GUILayout.Button(new GUIContent(" Additional Parameters", lightIconTexture), GuiStyles.areaTitleBarStyle);
            EditorGUILayout.BeginVertical();

            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 anisotropy factor.");
            _enableOutOfPhaseColorProperty.boolValue = EditorGUILayout.ToggleLeft("Enable Out-Of-Phase Color", _enableOutOfPhaseColorProperty.boolValue);
            EditorGUILayout.Separator();
            if (_enableOutOfPhaseColorProperty.boolValue)
            {
                EditorGUILayout.BeginVertical();

                GuiHelpers.DrawContextualHelpBox("The strength of the color.");
                GuiHelpers.DrawFloatField(ref _outOfPhaseColorStrengthProperty, "Strength");

                GuiHelpers.DrawContextualHelpBox("The color when the view direction is not towards the directional light.");
                EditorGUILayout.PropertyField(_outOfPhaseColorProperty);

                EditorGUILayout.EndVertical();
            }

            EditorGUILayout.EndVertical();

            EditorGUILayout.EndVertical();

            EditorGUILayout.Separator();
        }
        /// <summary>
        /// Displays Noise Mask Area
        /// </summary>
        private void DisplayNoiseMaskArea()
        {
            EditorGUILayout.BeginVertical();
            GUILayout.Button(new GUIContent(" Noise Mask", noiseMaskIconTexture), GuiStyles.areaTitleBarStyle);
            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.");
            EditorGUILayout.BeginVertical();

            EditorGUILayout.Separator();

            _noiseMaskBoolProperty.boolValue = EditorGUILayout.ToggleLeft("Enabled", _noiseMaskBoolProperty.boolValue);
            if (_noiseMaskBoolProperty.boolValue)
            {
                EditorGUILayout.BeginVertical();

                EditorGUILayout.Separator();
                GUILayout.Button("Parameters", EditorStyles.boldLabel);
                EditorGUILayout.BeginVertical(EditorStyles.helpBox);
                GuiHelpers.DrawFloatField(ref _noiseMaskSpeedProperty, "Speed");
                EditorGUILayout.Separator();
                GuiHelpers.DrawFloatField(ref _noiseMaskOffsetProperty, "Offset");
                EditorGUILayout.EndVertical();

                EditorGUILayout.Separator();
                GuiHelpers.DrawArea <TransformParameters>(ref _noiseMaskTransformProperty, "Transform");

                EditorGUILayout.EndVertical();
            }

            EditorGUILayout.Separator();

            EditorGUILayout.EndVertical();

            EditorGUILayout.EndVertical();
        }
示例#3
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, int displayMask)
        {
            SerializedProperty strengthProperty = injectionProperty.FindPropertyRelative("strength");

            GuiHelpers.DrawFloatField(ref strengthProperty, "Strength");

            if (displayMask == 1 || displayMask == 3)
            {
                EditorGUILayout.Separator();
                EditorGUILayout.BeginVertical();
                EditorGUILayout.LabelField("Texture Mask Levels", EditorStyles.boldLabel);
                SerializedProperty textureMaskLevelsProperty = injectionProperty.FindPropertyRelative("textureMaskLevelParameters");
                GuiHelpers.DrawLevelsField(ref textureMaskLevelsProperty);
                EditorGUILayout.EndVertical();
            }

            if (displayMask == 2 || displayMask == 3)
            {
                EditorGUILayout.Separator();
                EditorGUILayout.BeginVertical();
                EditorGUILayout.LabelField("Noise Mask Levels", EditorStyles.boldLabel);
                SerializedProperty noiseMaskLevelsProperty = injectionProperty.FindPropertyRelative("noiseMaskLevelParameters");
                GuiHelpers.DrawLevelsField(ref noiseMaskLevelsProperty);
                EditorGUILayout.EndVertical();
            }
        }
示例#4
0
        /// <summary>
        /// Displays the common parameters tab
        /// </summary>
        private void DisplayCommonSettingsArea()
        {
            EditorGUILayout.BeginVertical(EditorStyles.miniButton);
            GUILayout.Button(new GUIContent(" Base Parameters", lightIconTexture), GuiStyles.areaTitleBarStyle);
            EditorGUILayout.BeginVertical();

            EditorGUILayout.Separator();

            GuiHelpers.DrawContextualHelpBox("The \"Strength\" parameter allows you to multiply the intensity of the light source in the system.");
            GuiHelpers.DrawFloatField(ref _strengthProperty, "Strength");

            EditorGUILayout.Separator();

            GuiHelpers.DrawContextualHelpBox("The \"Override Color\" parameter allows you to replace the light's color in the system.");
            _overrideColorProperty.boolValue = EditorGUILayout.ToggleLeft("Override Color", _overrideColorProperty.boolValue);
            if (_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();
            }

            EditorGUILayout.Separator();

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

            EditorGUILayout.Separator();

            GuiHelpers.DrawContextualHelpBox("The \"Enable Cookie\" parameter allows you to compute the light's cookie (if enabled) in the system.");
            _useCookieProperty.boolValue = EditorGUILayout.ToggleLeft("Enable Cookie", _useCookieProperty.boolValue);

            EditorGUILayout.Separator();

            EditorGUILayout.EndVertical();

            EditorGUILayout.EndVertical();

            EditorGUILayout.Separator();
        }
示例#5
0
        /// <summary>
        /// Draws the fields required for a LevelsParameters object
        /// </summary>
        /// <param name="levelsProperty">The related serialized property</param>
        public static void DrawLevelsField(ref SerializedProperty levelsProperty)
        {
            GuiHelpers.DrawContextualHelpBox("The \"Levels\" parameter will filter the input value.\n\nKeeps the value between the \"Level Thresholds\" and remaps the range from 0 to 1.\"");
            SerializedProperty levelLowThresholdProperty = levelsProperty.FindPropertyRelative("levelLowThreshold");
            SerializedProperty levelHiThresholdProperty  = levelsProperty.FindPropertyRelative("levelHiThreshold");

            GuiHelpers.DrawMinMaxSlider(ref levelLowThresholdProperty, ref levelHiThresholdProperty, 0, 1, "Level Thresholds");

            SerializedProperty contrastProperty = levelsProperty.FindPropertyRelative("contrast");

            GuiHelpers.DrawFloatField(ref contrastProperty, "Contrast");

            GuiHelpers.DrawContextualHelpBox("The \"Output\" parameters will rescale this new range\n\n0 will now equal the lower \"Output Value\" and 1 will now equal the higher.");
            SerializedProperty outputLowValueProperty = levelsProperty.FindPropertyRelative("outputLowValue");

            GuiHelpers.DrawFloatField(ref outputLowValueProperty, "Output Low Value");
            SerializedProperty outputHiValueProperty = levelsProperty.FindPropertyRelative("outputHiValue");

            GuiHelpers.DrawFloatField(ref outputHiValueProperty, "Output High Value");
        }
示例#6
0
 /// <summary>
 /// Draws a float field
 /// </summary>
 /// <param name="floatProperty">The related serialized property</param>
 public static void DrawFloatField(ref SerializedProperty floatProperty)
 {
     GuiHelpers.DrawFloatField(ref floatProperty, "");
 }