コード例 #1
0
ファイル: InputNode.cs プロジェクト: belzecue/SSE
        public override void Initialize()
        {
            _inputId = _inputId ?? -1;

            if (OldPropertyConfigured())
            {
                var validProps = Owner.FindValidProperties(GetFieldType());
                var found      = false;
                foreach (var property in validProps)
                {
                    if (property.PropertyName == _inputName.Value ||
                        property.PropertyName == ("_" + _inputName.Value))
                    {
                        _inputId = property.PropertyId;
                        found    = true;
                        break;
                    }
                }

                if (!found)
                {
                    //Create new property...
                    _inputId = Owner.AddProperty(InputPropertyFromOldInput());
                }
                RemoveObsoleteInputConfig();
            }
        }
コード例 #2
0
ファイル: InputNode.cs プロジェクト: keijiro/SSE
        public override void Initialize()
        {
            _inputId = _inputId ?? -1;

            if( OldPropertyConfigured() )
            {
                var validProps = Owner.FindValidProperties( GetFieldType() );
                var found = false;
                foreach( var property in validProps )
                {
                    if( property.PropertyName == _inputName.Value
                       || property.PropertyName == ("_" + _inputName.Value) )
                    {
                        _inputId = property.PropertyId;
                        found = true;
                        break;
                    }
                }

                if( !found )
                {
                    //Create new property...
                    _inputId = Owner.AddProperty( InputPropertyFromOldInput() );
                }
                RemoveObsoleteInputConfig();
            }
        }
コード例 #3
0
ファイル: ShaderSettings.cs プロジェクト: belzecue/SSE
        public void Initialize()
        {
            _shaderName     = _shaderName ?? "MyShader";
            _shaderFallback = _shaderFallback ?? "Diffuse";

            //Fog settings
            _fogModeOverride    = _fogModeOverride ?? false;
            _fogColorOverride   = _fogColorOverride ?? false;
            _fogColor           = _fogColor ?? new Color(1.0f, 1.0f, 1.0f, 1.0f);
            _fogDensityOverride = _fogDensityOverride ?? false;
            _fogDensity         = _fogDensity ?? 0.5f;
            _fogNearLinear      = _fogNearLinear ?? 0.0f;
            _fogFarLinear       = _fogFarLinear ?? 1.0f;

            //RenderType
            _renderTypeCustom = _renderTypeCustom ?? new EditorString();

            _queueAdjust      = _queueAdjust ?? 0;
            _enableLOD        = _enableLOD ?? false;
            _lod              = _lod ?? 100;
            _ignoreProjectors = _ignoreProjectors ?? false;

            //ColorMask
            _colorMaskR = _colorMaskR ?? true;
            _colorMaskG = _colorMaskG ?? true;
            _colorMaskB = _colorMaskB ?? true;
            _colorMaskA = _colorMaskA ?? true;

            _dualForward        = _dualForward ?? false;
            _fullForwardShadows = _fullForwardShadows ?? false;
            _softVegetation     = _softVegetation ?? false;
            _noAmbient          = _noAmbient ?? false;
            _noLightmap         = _noLightmap ?? false;
            _approxview         = _approxview ?? false;
            _halfasview         = _halfasview ?? false;
            _noForwardAdd       = _noForwardAdd ?? false;
            _addShadow          = _addShadow ?? false;
        }
コード例 #4
0
ファイル: ShaderSettings.cs プロジェクト: JuanJSAR/SSE
		public void Initialize()
		{
			_shaderName = _shaderName ?? "";
			_shaderFallback = _shaderFallback ?? "Diffuse";
			
			//Fog settings
			_fogModeOverride = _fogModeOverride ?? false;
			_fogColorOverride = _fogColorOverride ?? false;
			_fogColor = _fogColor ?? new Color( 1.0f, 1.0f, 1.0f, 1.0f);
			_fogDensityOverride = _fogDensityOverride ?? false;
			_fogDensity = _fogDensity ?? 0.5f;
			_fogNearLinear = _fogNearLinear ?? 0.0f;
			_fogFarLinear = _fogFarLinear ?? 1.0f;
			
			//RenderType
			_renderTypeCustom = _renderTypeCustom ?? new EditorString();
			
			_queueAdjust = _queueAdjust ?? 0;
			_enableLOD = _enableLOD ?? false;
			_lod = _lod ?? 100;
			_ignoreProjectors = _ignoreProjectors ?? false;
			
			//ColorMask
			_colorMaskR = _colorMaskR ?? true;
			_colorMaskG = _colorMaskG ?? true;
			_colorMaskB = _colorMaskB ?? true;
			_colorMaskA = _colorMaskA ?? true;
			
			_dualForward = _dualForward ?? false;
			_fullForwardShadows = _fullForwardShadows ?? false;
			_softVegetation = _softVegetation ?? false;
			_noAmbient = _noAmbient ?? false;
			_noLightmap = _noLightmap ?? false;
			_approxview = _approxview ?? false;
			_halfasview = _halfasview ?? false;
			_noForwardAdd = _noForwardAdd ?? false;
			_addShadow = _addShadow ?? false;
		}
コード例 #5
0
ファイル: InputNode.cs プロジェクト: belzecue/SSE
        public override void DrawProperties()
        {
            _newInputName = _newInputName ?? "";
            base.DrawProperties();

            var validIDs = Owner.FindValidProperties(GetFieldType()).ToList();

            var propertyNames  = (from property in validIDs select property.PropertyName).ToList();
            var propertyValues = (from property in validIDs select property.PropertyId).ToList();

            propertyNames.Insert(0, "Unconfigured");
            propertyValues.Insert(0, -1);
            _inputId.Value = EditorGUILayout.IntPopup("Input Property", _inputId.Value, propertyNames.ToArray(), propertyValues.ToArray());

            if (ReferencedProperty() == null)
            {
                GUILayout.Label("Add new input?");
                GUILayout.BeginHorizontal();
                _newInputName = GUILayout.TextField(_newInputName, GUILayout.Width(200));
                GUILayout.FlexibleSpace();
                Event e = Event.current;
                if (GUILayout.Button("Add", GUILayout.Width(75)) || e.isKey && e.keyCode == KeyCode.Return)
                {
                    if (!string.IsNullOrEmpty(_newInputName))
                    {
                        var prop = NewPropertyInstance();
                        prop.PropertyName = _newInputName;
                        _inputId          = Owner.AddProperty(prop);
                    }
                    else
                    {
                        EditorUtility.DisplayDialog("No Name specified", "You must specify an input name.", "Ok");
                    }
                }
                GUILayout.EndHorizontal();
            }
        }
コード例 #6
0
ファイル: InputNode.cs プロジェクト: keijiro/SSE
        public override void DrawProperties()
        {
            _newInputName = _newInputName ?? "";
            base.DrawProperties();

            var validIDs = Owner.FindValidProperties( GetFieldType() ).ToList();

            var propertyNames = (from property in validIDs select property.PropertyName).ToList();
            var propertyValues = (from property in validIDs select property.PropertyId).ToList();

            propertyNames.Insert( 0, "Unconfigured" );
            propertyValues.Insert( 0, -1 );
            _inputId.Value = EditorGUILayout.IntPopup( "Input Property", _inputId.Value, propertyNames.ToArray(), propertyValues.ToArray() );

            if( ReferencedProperty() == null )
            {
                GUILayout.Label( "Add new input?" );
                GUILayout.BeginHorizontal();
                _newInputName = GUILayout.TextField( _newInputName, GUILayout.Width( 200 ) );
                GUILayout.FlexibleSpace();
                if( GUILayout.Button( "Add", GUILayout.Width( 75 ) ) )
                {
                    if( !string.IsNullOrEmpty( _newInputName ) )
                    {
                        var prop = NewPropertyInstance();
                        prop.PropertyName = _newInputName;
                        _inputId = Owner.AddProperty( prop );
                    }
                    else
                    {
                        EditorUtility.DisplayDialog("No Name specified", "You must specify an input name.", "Ok");
                    }
                }
                GUILayout.EndHorizontal();
            }
        }
コード例 #7
0
ファイル: ShaderSettings.cs プロジェクト: keijiro/SSE
        //property.Expanded =  EditorGUILayout.Foldout( property.Expanded, property.GetPropertyType().PropertyTypeString() );
        public void Draw()
        {
            var shaderNameContent = new GUIContent(
                    "Shader Name",
                    "Name for shader. Includes the hierarchy listing, that is, MyShaders/Shader will be in a folder called \"MyShaders\" in the shader selection dropdown. Also used when referring to fallback shaders.");

            var oldColor = GUI.color;
            if( string.IsNullOrEmpty(_shaderName ) )
            {
                GUI.color = Color.red;
            }
            _shaderName.Value = EditorGUILayout.TextField(shaderNameContent, _shaderName.Value);
            GUI.color = oldColor;

            var shaderFallbackContent = new GUIContent(
                    "Shader Fallback",
                    "Fallback shader to use in case this shader can not be used.");

            _shaderFallback.Value = EditorGUILayout.TextField( shaderFallbackContent, _shaderFallback.Value );

            var targetContent = new GUIContent("Shader Model","Requires more recent hardware to use the shader, but allows for more instructions, texture reads, and more input information.");
            _shaderTarget = (ShaderTarget)EditorGUILayout.EnumPopup( targetContent, _shaderTarget );

            var excludePathContent = new GUIContent("Exclude Path","Exclude a renderpath from shader generation");
            _excludePath = (ExcludePath)EditorGUILayout.EnumPopup( excludePathContent, _excludePath );

            GUILayout.Space(8);
            _showQueueSettings = EditorGUILayout.Foldout( _showQueueSettings, "Queue Settings" );
            if( _showQueueSettings )
            {
                var renderTypeContent = new GUIContent("Render Type","This is the rendertype tag inserted into the shader. Can be used for shader replace");
                _renderType = (RenderType)EditorGUILayout.EnumPopup( renderTypeContent, _renderType );

                if ( _renderType == RenderType.Custom )
                    _renderTypeCustom.Value = EditorGUILayout.TextField( "Custom Type" ,_renderTypeCustom.Value );

                var queueContent = new GUIContent("Render Queue","The render queue that this material will be put in");
                _queue = (Queue)EditorGUILayout.EnumPopup( queueContent, _queue );

                var offContent = new GUIContent(
                    "Queue Offset",
                    "Offset for drawing. Used to ensure some things draw before or after others, it specifically is an offset from the given queue- That is to say, you won't have a transparent object draw before an opaque object (or similar) due to this offset.");
                _queueAdjust = EditorGUILayout.IntSlider(offContent, _queueAdjust.Value, -100, 100);
            }

            GUILayout.Space( 8 );
            _showCullingAndDepthSettings = EditorGUILayout.Foldout( _showCullingAndDepthSettings, "Culling and Depth Settings" );
            if( _showCullingAndDepthSettings )
            {
                var zWriteContent = new GUIContent("Write Depth","Depth is considered when testing other objects. Disable for certain effects, like letting other things draw over yourself, or for speed on most overlays.");
                _zWrite = (ZWrite)EditorGUILayout.EnumPopup( zWriteContent, _zWrite );

                var cullModeContent = new GUIContent("CullMode","Select back / forward to clip backwards facing polygons");
                _cullMode = (CullMode)EditorGUILayout.EnumPopup( cullModeContent, _cullMode );

                var zTestContent = new GUIContent("ZTest","Select Z-Test Value");
                _zTest = (ZTest)EditorGUILayout.EnumPopup( zTestContent, _zTest );

                var enableLODContent = new GUIContent("Enable LOD","Enable Shader LOD scaling");
                _enableLOD = EditorGUILayout.BeginToggleGroup( enableLODContent, _enableLOD );
                _lod = EditorGUILayout.IntSlider( "LOD", _lod, 0, 1000 );
                EditorGUILayout.EndToggleGroup();
            }

            GUILayout.Space( 8 );
            _showBlending = EditorGUILayout.Foldout( _showBlending, "Blending Settings" );
            if( _showBlending )
            {
                var blendingTypeContent = new GUIContent("Blend Type","Use a build in blend mode or a custom blend mode");
                _blending = (BlendingType)EditorGUILayout.EnumPopup( blendingTypeContent, _blending );

                if( CustomBlendingEnabled() )
                {
                    var srcBlendContent = new GUIContent("Src Blend Mode","How the source channel of blending is used");
                    _srcBlend = (BlendingMode)EditorGUILayout.EnumPopup( srcBlendContent, _srcBlend );

                    var dstBlendContent = new GUIContent("Dst Blend Mode","How the destination channel of blending is used");
                    _dstBlend = (BlendingMode)EditorGUILayout.EnumPopup( dstBlendContent, _dstBlend );
                }
            }

            GUILayout.Space( 8 );
            _showColorAndLighting = EditorGUILayout.Foldout( _showColorAndLighting, "Color And Lighting Settings" );
            if( _showColorAndLighting )
            {
                GUILayout.BeginHorizontal();
                GUILayout.Label( "Color Mask:", GUILayout.ExpandWidth(false) );
                _colorMaskR.Value = EditorExtensions.ToggleButton( _colorMaskR.Value, "R","Mask R Channel");
                _colorMaskG.Value = EditorExtensions.ToggleButton( _colorMaskG.Value, "G","Mask G Channel");
                _colorMaskB.Value = EditorExtensions.ToggleButton( _colorMaskB.Value, "B","Mask B Channel");
                _colorMaskA.Value = EditorExtensions.ToggleButton( _colorMaskA.Value, "A","Mask A Channel");
                GUILayout.EndHorizontal();

                _dualForward = GUILayout.Toggle( _dualForward, new GUIContent( "Forward Dual Lightmaps","Use dual lightmaps in the forward rendering path" ));
                _fullForwardShadows = GUILayout.Toggle( _fullForwardShadows, new GUIContent( "Forward Full Shadows", "Support all shadow types in Forward rendering path." ));
                _softVegetation = GUILayout.Toggle( _softVegetation, new GUIContent( "Soft Vegetation", "Makes the surface shader only be rendered when Soft Vegetation is on." ));
                _noAmbient = GUILayout.Toggle( _noAmbient, new GUIContent( "No Ambient", "Do not apply any ambient lighting or spherical harmonics lights."));
                _noLightmap = GUILayout.Toggle( _noLightmap, new GUIContent( "No Lightmaps", "Disables lightmap support in this shader (makes a shader smaller)." ));
                _addShadow = GUILayout.Toggle( _addShadow, new GUIContent( "Advanced Shadow Pass", "Performs vertex transformations and clipping for the shadow pass, you need to use this if shadows do not display properly." ));

                _ignoreProjectors = GUILayout.Toggle( _ignoreProjectors, new GUIContent( "Ignore Projectors", "Ignores projector components, should be used if your doing custom vertex transformations or most transparency" ));
                _approxview = GUILayout.Toggle( _approxview, new GUIContent( "Approximate View", "Computes normalized view direction per-vertex instead of per-pixel, for shaders that need it. This is faster, but view direction is not entirely correct when camera gets close to surface." ));
                _halfasview = GUILayout.Toggle( _halfasview, new GUIContent( "Half As View", "Pass half-direction vector into the lighting function instead of view-direction. Half-direction will be computed and normalized per vertex. This is faster, but not entirely correct." ));
                _noForwardAdd = GUILayout.Toggle( _noForwardAdd, new GUIContent( "Disable Forward Add", "Disables Forward rendering additive pass. This makes the shader support one full directional light, with all other lights computed per-vertex/SH. Makes shaders smaller as well." ));
            }

            GUILayout.Space( 8 );
            _showFogSettings = EditorGUILayout.Foldout( _showFogSettings, "Fog Settings" );
            if( _showFogSettings )
            {
                _fogModeOverride = EditorGUILayout.BeginToggleGroup( "Fog Mode Override", _fogModeOverride );
                var fogModeContent = new GUIContent("Fog Mode","The type of fog to use");
                _fogMode = (FogMode)EditorGUILayout.EnumPopup( fogModeContent, _fogMode );

                if( _fogMode == FogMode.Linear )
                {
                    _fogNearLinear.Value = EditorGUILayout.FloatField( "Near Linear Range:", _fogNearLinear );
                    _fogFarLinear.Value = EditorGUILayout.FloatField( "Far Linear Range:", _fogFarLinear );
                }
                EditorGUILayout.EndToggleGroup();

                _fogColorOverride = EditorGUILayout.BeginToggleGroup( "Fog Color Override", _fogColorOverride );
                _fogColor.Value = EditorGUILayout.ColorField("Fog Color:", _fogColor );
                EditorGUILayout.EndToggleGroup();

                _fogDensityOverride = EditorGUILayout.BeginToggleGroup( "Fog Density Override", _fogDensityOverride );
                _fogDensity.Value = EditorGUILayout.FloatField( "Fog Density:", _fogDensity );
                EditorGUILayout.EndToggleGroup();
            }
        }
コード例 #8
0
ファイル: ShaderSettings.cs プロジェクト: belzecue/SSE
        //property.Expanded =  EditorGUILayout.Foldout( property.Expanded, property.GetPropertyType().PropertyTypeString() );

        public void Draw()
        {
            var shaderNameContent = new GUIContent(
                "Shader Name",
                "Name for shader. Includes the hierarchy listing, that is, MyShaders/Shader will be in a folder called \"MyShaders\" in the shader selection dropdown. Also used when referring to fallback shaders.");

            var oldColor = GUI.color;

            if (string.IsNullOrEmpty(_shaderName))
            {
                GUI.color = Color.red;
            }
            _shaderName.Value = EditorGUILayout.TextField(shaderNameContent, _shaderName.Value);
            GUI.color         = oldColor;

            var shaderFallbackContent = new GUIContent(
                "Shader Fallback",
                "Fallback shader to use in case this shader can not be used.");

            _shaderFallback.Value = EditorGUILayout.TextField(shaderFallbackContent, _shaderFallback.Value);

            var targetContent = new GUIContent("Shader Model", "Requires more recent hardware to use the shader, but allows for more instructions, texture reads, and more input information.");

            _shaderTarget = (ShaderTarget)EditorGUILayout.EnumPopup(targetContent, _shaderTarget);

            var excludePathContent = new GUIContent("Exclude Path", "Exclude a renderpath from shader generation");

            _excludePath = (ExcludePath)EditorGUILayout.EnumPopup(excludePathContent, _excludePath);

#if UNITY_5_3_OR_NEWER
            var shaderTypeContent = new GUIContent("Shader Type", "You can select Physically Based Rendering after Unity 5.3");
            var currentshaderType = _shaderType;
            _shaderType = (ShaderType)EditorGUILayout.EnumPopup(shaderTypeContent, currentshaderType);
            if ((currentshaderType != _shaderType) && (OnChangeShaderType != null))
            {
                OnChangeShaderType();
            }
#endif

            GUILayout.Space(8);
            _showQueueSettings = EditorGUILayout.Foldout(_showQueueSettings, "Queue Settings");
            if (_showQueueSettings)
            {
                var renderTypeContent = new GUIContent("Render Type", "This is the rendertype tag inserted into the shader. Can be used for shader replace");
                _renderType = (RenderType)EditorGUILayout.EnumPopup(renderTypeContent, _renderType);

                if (_renderType == RenderType.Custom)
                {
                    _renderTypeCustom.Value = EditorGUILayout.TextField("Custom Type", _renderTypeCustom.Value);
                }

                var queueContent = new GUIContent("Render Queue", "The render queue that this material will be put in");
                _queue = (Queue)EditorGUILayout.EnumPopup(queueContent, _queue);

                var offContent = new GUIContent(
                    "Queue Offset",
                    "Offset for drawing. Used to ensure some things draw before or after others, it specifically is an offset from the given queue- That is to say, you won't have a transparent object draw before an opaque object (or similar) due to this offset.");
                _queueAdjust = EditorGUILayout.IntSlider(offContent, _queueAdjust.Value, -100, 100);
            }

            GUILayout.Space(8);
            _showCullingAndDepthSettings = EditorGUILayout.Foldout(_showCullingAndDepthSettings, "Culling and Depth Settings");
            if (_showCullingAndDepthSettings)
            {
                var zWriteContent = new GUIContent("Write Depth", "Depth is considered when testing other objects. Disable for certain effects, like letting other things draw over yourself, or for speed on most overlays.");
                _zWrite = (ZWrite)EditorGUILayout.EnumPopup(zWriteContent, _zWrite);

                var cullModeContent = new GUIContent("CullMode", "Select back / forward to clip backwards facing polygons");
                _cullMode = (CullMode)EditorGUILayout.EnumPopup(cullModeContent, _cullMode);

                var zTestContent = new GUIContent("ZTest", "Select Z-Test Value");
                _zTest = (ZTest)EditorGUILayout.EnumPopup(zTestContent, _zTest);

                var enableLODContent = new GUIContent("Enable LOD", "Enable Shader LOD scaling");
                _enableLOD = EditorGUILayout.BeginToggleGroup(enableLODContent, _enableLOD);
                _lod       = EditorGUILayout.IntSlider("LOD", _lod, 0, 1000);
                EditorGUILayout.EndToggleGroup();
            }

            GUILayout.Space(8);
            _showBlending = EditorGUILayout.Foldout(_showBlending, "Blending Settings");
            if (_showBlending)
            {
                var blendingTypeContent = new GUIContent("Blend Type", "Use a build in blend mode or a custom blend mode");
                _blending = (BlendingType)EditorGUILayout.EnumPopup(blendingTypeContent, _blending);

                if (CustomBlendingEnabled())
                {
                    var srcBlendContent = new GUIContent("Src Blend Mode", "How the source channel of blending is used");
                    _srcBlend = (BlendingMode)EditorGUILayout.EnumPopup(srcBlendContent, _srcBlend);

                    var dstBlendContent = new GUIContent("Dst Blend Mode", "How the destination channel of blending is used");
                    _dstBlend = (BlendingMode)EditorGUILayout.EnumPopup(dstBlendContent, _dstBlend);
                }
            }

            GUILayout.Space(8);
            _showColorAndLighting = EditorGUILayout.Foldout(_showColorAndLighting, "Color And Lighting Settings");
            if (_showColorAndLighting)
            {
                GUILayout.BeginHorizontal();
                GUILayout.Label("Color Mask:", GUILayout.ExpandWidth(false));
                _colorMaskR.Value = EditorExtensions.ToggleButton(_colorMaskR.Value, "R", "Mask R Channel");
                _colorMaskG.Value = EditorExtensions.ToggleButton(_colorMaskG.Value, "G", "Mask G Channel");
                _colorMaskB.Value = EditorExtensions.ToggleButton(_colorMaskB.Value, "B", "Mask B Channel");
                _colorMaskA.Value = EditorExtensions.ToggleButton(_colorMaskA.Value, "A", "Mask A Channel");
                GUILayout.EndHorizontal();

                _dualForward        = GUILayout.Toggle(_dualForward, new GUIContent("Forward Dual Lightmaps", "Use dual lightmaps in the forward rendering path"));
                _fullForwardShadows = GUILayout.Toggle(_fullForwardShadows, new GUIContent("Forward Full Shadows", "Support all shadow types in Forward rendering path."));
                _softVegetation     = GUILayout.Toggle(_softVegetation, new GUIContent("Soft Vegetation", "Makes the surface shader only be rendered when Soft Vegetation is on."));
                _noAmbient          = GUILayout.Toggle(_noAmbient, new GUIContent("No Ambient", "Do not apply any ambient lighting or spherical harmonics lights."));
                _noLightmap         = GUILayout.Toggle(_noLightmap, new GUIContent("No Lightmaps", "Disables lightmap support in this shader (makes a shader smaller)."));
                _addShadow          = GUILayout.Toggle(_addShadow, new GUIContent("Advanced Shadow Pass", "Performs vertex transformations and clipping for the shadow pass, you need to use this if shadows do not display properly."));

                _ignoreProjectors = GUILayout.Toggle(_ignoreProjectors, new GUIContent("Ignore Projectors", "Ignores projector components, should be used if your doing custom vertex transformations or most transparency"));
                _approxview       = GUILayout.Toggle(_approxview, new GUIContent("Approximate View", "Computes normalized view direction per-vertex instead of per-pixel, for shaders that need it. This is faster, but view direction is not entirely correct when camera gets close to surface."));
                _halfasview       = GUILayout.Toggle(_halfasview, new GUIContent("Half As View", "Pass half-direction vector into the lighting function instead of view-direction. Half-direction will be computed and normalized per vertex. This is faster, but not entirely correct."));
                _noForwardAdd     = GUILayout.Toggle(_noForwardAdd, new GUIContent("Disable Forward Add", "Disables Forward rendering additive pass. This makes the shader support one full directional light, with all other lights computed per-vertex/SH. Makes shaders smaller as well."));
            }

            GUILayout.Space(8);
            _showFogSettings = EditorGUILayout.Foldout(_showFogSettings, "Fog Settings");
            if (_showFogSettings)
            {
                _fogModeOverride = EditorGUILayout.BeginToggleGroup("Fog Mode Override", _fogModeOverride);
                var fogModeContent = new GUIContent("Fog Mode", "The type of fog to use");
                _fogMode = (FogMode)EditorGUILayout.EnumPopup(fogModeContent, _fogMode);

                if (_fogMode == FogMode.Linear)
                {
                    _fogNearLinear.Value = EditorGUILayout.FloatField("Near Linear Range:", _fogNearLinear);
                    _fogFarLinear.Value  = EditorGUILayout.FloatField("Far Linear Range:", _fogFarLinear);
                }
                EditorGUILayout.EndToggleGroup();

                _fogColorOverride = EditorGUILayout.BeginToggleGroup("Fog Color Override", _fogColorOverride);
                _fogColor.Value   = EditorGUILayout.ColorField("Fog Color:", _fogColor);
                EditorGUILayout.EndToggleGroup();

                _fogDensityOverride = EditorGUILayout.BeginToggleGroup("Fog Density Override", _fogDensityOverride);
                _fogDensity.Value   = EditorGUILayout.FloatField("Fog Density:", _fogDensity);
                EditorGUILayout.EndToggleGroup();
            }
        }