private void DrawPatreonSettings(MaterialEditor materialEditor)
        {
            //Plugins for Patreon releases
            if (isPatreonShader)
            {
                if (isEyeTracking)
                {
                    showEyeTracking = XSStyles.ShurikenFoldout("Eye Tracking Settings", showEyeTracking);
                    if (showEyeTracking)
                    {
                        materialEditor.ShaderProperty(_LeftRightPan, new GUIContent("Left Right Adj.", "Adjusts the eyes manually left or right."));
                        materialEditor.ShaderProperty(_UpDownPan, new GUIContent("Up Down Adj.", "Adjusts the eyes manually up or down."));

                        XSStyles.SeparatorThin();
                        materialEditor.ShaderProperty(_AttentionSpan, new GUIContent("Attention Span", "How often should the eyes look at the target; 0 = never, 1 = always, 0.5 = half of the time."));
                        materialEditor.ShaderProperty(_FollowPower, new GUIContent("Follow Power", "The influence the target has on the eye"));
                        materialEditor.ShaderProperty(_LookSpeed, new GUIContent("Look Speed", "How fast the eye transitions to looking at the target"));
                        materialEditor.ShaderProperty(_Twitchyness, new GUIContent("Refocus Frequency", "How much should the eyes look around near the target?"));

                        XSStyles.SeparatorThin();
                        materialEditor.ShaderProperty(_IrisSize, new GUIContent("Iris Size", "Size of the iris"));
                        materialEditor.ShaderProperty(_FollowLimit, new GUIContent("Follow Limit", "Limits the angle from the front of the face on how far the eyes can track/rotate."));
                        materialEditor.ShaderProperty(_EyeOffsetLimit, new GUIContent("Offset Limit", "Limit for how far the eyes can turn"));
                    }
                }
            }
            //
        }
        private void DrawNormalSettings(MaterialEditor materialEditor)
        {
            showNormalMapSettings = XSStyles.ShurikenFoldout("Normal Maps", showNormalMapSettings);
            if (showNormalMapSettings)
            {
                materialEditor.ShaderProperty(_NormalMapMode, new GUIContent("Normal Map Source", "How to alter the normals of the mesh, using which source?"));
                if (_NormalMapMode.floatValue == 0)
                {
                    materialEditor.TexturePropertySingleLine(new GUIContent("Normal Map", "Normal Map"), _BumpMap);
                    materialEditor.ShaderProperty(_BumpScale, new GUIContent("Normal Strength", "Strength of the main Normal Map"), 2);
                    materialEditor.ShaderProperty(_UVSetNormal, new GUIContent("UV Set", "The UV set to use for the Normal Map"), 2);
                    materialEditor.TextureScaleOffsetProperty(_BumpMap);

                    XSStyles.SeparatorThin();
                    materialEditor.TexturePropertySingleLine(new GUIContent("Detail Normal Map", "Detail Normal Map"), _DetailNormalMap);
                    materialEditor.ShaderProperty(_DetailNormalMapScale, new GUIContent("Detail Normal Strength", "Strength of the detail Normal Map"), 2);
                    materialEditor.ShaderProperty(_UVSetDetNormal, new GUIContent("UV Set", "The UV set to use for the Detail Normal Map"), 2);
                    materialEditor.TextureScaleOffsetProperty(_DetailNormalMap);

                    XSStyles.SeparatorThin();
                    materialEditor.TexturePropertySingleLine(new GUIContent("Detail Mask", "Mask for Detail Maps"), _DetailMask);
                    materialEditor.ShaderProperty(_UVSetDetMask, new GUIContent("UV Set", "The UV set to use for the Detail Mask"), 2);
                    materialEditor.TextureScaleOffsetProperty(_DetailMask);
                }
            }
        }
        private void DrawMainSettings(MaterialEditor materialEditor)
        {
            showMainSettings = XSStyles.ShurikenFoldout("Main Settings", showMainSettings);
            if (showMainSettings)
            {
                materialEditor.TexturePropertySingleLine(new GUIContent("Main Texture", "The main Albedo texture."), _MainTex, _Color);
                if (isCutout)
                {
                    materialEditor.ShaderProperty(_Cutoff, new GUIContent("Cutoff", "The Cutoff Amount"), 2);
                }
                materialEditor.ShaderProperty(_UVSetAlbedo, new GUIContent("UV Set", "The UV set to use for the Albedo Texture."), 2);
                materialEditor.TextureScaleOffsetProperty(_MainTex);

                materialEditor.TexturePropertySingleLine(new GUIContent("HSV Mask", "RGB Mask: R = Hue,  G = Saturation, B = Brightness"), _HSVMask);
                materialEditor.ShaderProperty(_Hue, new GUIContent("Hue", "Controls Hue of the final output from the shader."));
                materialEditor.ShaderProperty(_Saturation, new GUIContent("Saturation", "Controls saturation of the final output from the shader."));
                materialEditor.ShaderProperty(_Value, new GUIContent("Brightness", "Controls value of the final output from the shader."));

                if (isDithered)
                {
                    XSStyles.SeparatorThin();
                    materialEditor.ShaderProperty(_FadeDither, new GUIContent("Distance Fading", "Make the shader dither out based on the distance to the camera."));
                    materialEditor.ShaderProperty(_FadeDitherDistance, new GUIContent("Fade Threshold", "The distance at which the fading starts happening."));
                }
            }
        }
Exemplo n.º 4
0
        private void DrawSpecularSettings(MaterialEditor materialEditor)
        {
            showSpecular = XSStyles.ShurikenFoldout("Specular", showSpecular);
            if (showSpecular)
            {
                materialEditor.ShaderProperty(_SpecMode, new GUIContent("Specular Mode", "Specular Mode."));
                materialEditor.ShaderProperty(_SpecularStyle, new GUIContent("Specular Style", "Specular Style."));

                XSStyles.SeparatorThin();
                materialEditor.TexturePropertySingleLine(new GUIContent("Specular Map(R,G,B)", "Specular Map. Red channel controls Intensity, Green controls how much specular is tinted by Albedo, and Blue controls Smoothness (Only for Blinn-Phong, and GGX)."), _SpecularMap);
                materialEditor.TextureScaleOffsetProperty(_SpecularMap);
                materialEditor.ShaderProperty(_UVSetSpecular, new GUIContent("UV Set", "The UV set to use for the Specular Map"), 2);
                materialEditor.ShaderProperty(_SpecularIntensity, new GUIContent("Specular Intensity", "Specular Intensity."), 2);
                materialEditor.ShaderProperty(_SpecularAlbedoTint, new GUIContent("Specular Albedo Tint", "How much the specular highlight should derive color from the albedo of the object."), 2);
                if (_SpecMode.floatValue == 0 || _SpecMode.floatValue == 2)
                {
                    materialEditor.ShaderProperty(_SpecularArea, new GUIContent("Specular Area", "Specular Area."), 2);
                }
                else
                {
                    materialEditor.ShaderProperty(_AnisotropicAX, new GUIContent("Anisotropic Width", "Anisotropic Width, makes anistropic relfections more horizontal"), 2);
                    materialEditor.ShaderProperty(_AnisotropicAY, new GUIContent("Anisotropic Height", "Anisotropic Height, makes anistropic relfections more vertical"), 2);
                }
            }
        }
        private void DrawSpecularSettings(MaterialEditor materialEditor)
        {
            showSpecular = XSStyles.ShurikenFoldout("Specular", showSpecular);
            if (showSpecular)
            {
                XSStyles.SeparatorThin();

                materialEditor.TexturePropertySingleLine(new GUIContent("Specular Map(R,G,B)", "Specular Map. Red channel controls Intensity, Green controls how much specular is tinted by Albedo, and Blue controls Smoothness (Only for Blinn-Phong, and GGX)."), _SpecularMap);
                materialEditor.TextureScaleOffsetProperty(_SpecularMap);
                materialEditor.ShaderProperty(_UVSetSpecular, new GUIContent("UV Set", "The UV set to use for the Specular Map"), 2);
                materialEditor.ShaderProperty(_SpecularIntensity, new GUIContent("Intensity", "Specular Intensity."), 2);
                materialEditor.ShaderProperty(_SpecularArea, new GUIContent("Roughness", "Roughness"), 2);
                materialEditor.ShaderProperty(_SpecularAlbedoTint, new GUIContent("Albedo Tint", "How much the specular highlight should derive color from the albedo of the object."), 2);
                materialEditor.ShaderProperty(_SpecularSharpness, new GUIContent("Sharpness", "How hard of and edge transitions should the specular have?"), 2);
                materialEditor.ShaderProperty(_AnisotropicSpecular, new GUIContent("Anisotropy", "The amount of anisotropy the surface has - this will stretch the reflection along an axis (think bottom of a frying pan)"), 2);
            }
        }
        private void DrawEmissionSettings(MaterialEditor materialEditor)
        {
            showEmission = XSStyles.ShurikenFoldout("Emission", showEmission);
            if (showEmission)
            {
                materialEditor.TexturePropertySingleLine(new GUIContent("Emission Map", "Emissive map. White to black, unless you want multiple colors."), _EmissionMap, _EmissionColor);
                materialEditor.TextureScaleOffsetProperty(_EmissionMap);
                materialEditor.ShaderProperty(_UVSetEmission, new GUIContent("UV Set", "The UV set to use for the Emission Map"), 2);
                materialEditor.ShaderProperty(_EmissionToDiffuse, new GUIContent("Tint To Diffuse", "Tints the emission to the Diffuse Color"), 2);

                XSStyles.SeparatorThin();
                materialEditor.ShaderProperty(_ScaleWithLight, new GUIContent("Scale w/ Light", "Scales the emission intensity based on how dark or bright the environment is."));
                if (_ScaleWithLight.floatValue == 0)
                {
                    materialEditor.ShaderProperty(_ScaleWithLightSensitivity, new GUIContent("Scaling Sensitivity", "How agressively the emission should scale with the light."));
                }
            }
        }
        private void DrawShadowSettings(MaterialEditor materialEditor, Material material)
        {
            showShadows = XSStyles.ShurikenFoldout("Shadows", showShadows);
            if (showShadows)
            {
                materialEditor.TexturePropertySingleLine(new GUIContent("Ramp Selection Mask", "A black to white mask that determins how far up on the multi ramp to sample. 0 for bottom, 1 for top, 0.5 for middle, 0.25, and 0.75 for mid bottom and mid top respectively."), _RampSelectionMask);

                XSStyles.SeparatorThin();
                if (_RampSelectionMask.textureValue != null)
                {
                    string          rampMaskPath = AssetDatabase.GetAssetPath(_RampSelectionMask.textureValue);
                    TextureImporter ti           = (TextureImporter)TextureImporter.GetAtPath(rampMaskPath);
                    if (ti.sRGBTexture)
                    {
                        if (XSStyles.HelpBoxWithButton(new GUIContent("This texture is not marked as Linear.", "This is recommended for the mask"), new GUIContent("Fix Now")))
                        {
                            ti.sRGBTexture = false;
                            AssetDatabase.ImportAsset(rampMaskPath, ImportAssetOptions.ForceUpdate);
                            AssetDatabase.Refresh();
                        }
                    }
                }

                materialEditor.TexturePropertySingleLine(new GUIContent("Shadow Ramp", "Shadow Ramp, Dark to Light should be Left to Right"), _Ramp);
                materialEditor.ShaderProperty(_ShadowSharpness, new GUIContent("Shadow Sharpness", "Controls the sharpness of recieved shadows, as well as the sharpness of 'shadows' from Vertex Lighting."));

                XSStyles.SeparatorThin();
                materialEditor.ShaderProperty(_OcclusionMode, new GUIContent("Occlusion Mode", "How to calculate the occlusion map contribution"));
                materialEditor.TexturePropertySingleLine(new GUIContent("Occlusion Map", "Occlusion Map, used to darken areas on the model artifically."), _OcclusionMap);
                materialEditor.ShaderProperty(_OcclusionIntensity, new GUIContent("Intensity", "Occlusion intensity"), 2);
                materialEditor.ShaderProperty(_UVSetOcclusion, new GUIContent("UV Set", "The UV set to use for the Occlusion Texture"), 2);
                materialEditor.TextureScaleOffsetProperty(_OcclusionMap);

                XSStyles.SeparatorThin();
                XSStyles.constrainedShaderProperty(materialEditor, _ShadowRim, new GUIContent("Shadow Rim", "Shadow Rim Color. Set to white to disable."), 0);
                materialEditor.ShaderProperty(_ShadowRimAlbedoTint, new GUIContent("Shadow Rim Albedo Tint", "How much the Albedo texture should effect the Shadow Rim color."));
                materialEditor.ShaderProperty(_ShadowRimRange, new GUIContent("Range", "Range of the Shadow Rim"), 2);
                materialEditor.ShaderProperty(_ShadowRimThreshold, new GUIContent("Threshold", "Threshold of the Shadow Rim"), 2);
                materialEditor.ShaderProperty(_ShadowRimSharpness, new GUIContent("Sharpness", "Sharpness of the Shadow Rim"), 2);
                XSStyles.callGradientEditor(material);
            }
        }
Exemplo n.º 8
0
        public void OnGUI()
        {
            scrollPos = EditorGUILayout.BeginScrollView(scrollPos);

            GUILayout.BeginHorizontal();
            GUILayout.Space(105);
            XSStyles.doLabel("1");
            GUILayout.Space(105);
            XSStyles.doLabel("2");
            GUILayout.Space(105);
            XSStyles.doLabel("3");
            GUILayout.Space(105);
            XSStyles.doLabel("4");
            GUILayout.EndHorizontal();

            XSStyles.SeparatorThin();
            GUILayout.BeginHorizontal();
            for (int i = 0; i < 4; i++)
            {
                EditorGUIUtility.labelWidth = 0.01f;
                textures[i] = (Texture2D)EditorGUILayout.ObjectField(new GUIContent("", ""), textures[i], typeof(Texture2D), true);
            }
            GUILayout.EndHorizontal();

            float oldLabelWidth = EditorGUIUtility.labelWidth;

            EditorGUIUtility.labelWidth = 40;
            GUIStyle headerStyle = EditorStyles.boldLabel;

            headerStyle.alignment    = TextAnchor.UpperLeft;
            headerStyle.fontStyle    = FontStyle.Bold;
            headerStyle.stretchWidth = true;

            XSStyles.SeparatorThin();
            EditorGUILayout.BeginHorizontal();
            GUILayout.Label("Output Channel:", headerStyle);

            GUILayout.Label("R", headerStyle);
            GUILayout.Label("G", headerStyle);
            GUILayout.Label("B", headerStyle);
            GUILayout.Label("A", headerStyle);
            EditorGUILayout.EndHorizontal();

            GUILayout.BeginHorizontal();
            GUILayout.Label("Src Texture:");
            GUILayout.Space(20);
            for (int i = 0; i < 4; i++)
            {
                pickTexture[i] = (ETextures)EditorGUILayout.EnumPopup("", pickTexture[i]);
            }
            GUILayout.EndHorizontal();

            GUILayout.BeginHorizontal();
            GUILayout.Label("Src Channel:");
            GUILayout.Space(17);
            for (int i = 0; i < 4; i++)
            {
                texChannels[i] = (EChannels)EditorGUILayout.EnumPopup("", texChannels[i]);
            }
            GUILayout.EndHorizontal();
            GUILayout.BeginHorizontal();
            GUILayout.Label("Invert Channel:");
            for (int i = 0; i < 4; i++)
            {
                invertChannel[i] = EditorGUILayout.Toggle("", invertChannel[i]);
            }
            GUILayout.EndHorizontal();

            GUILayout.Space(20);
            EditorGUILayout.EndScrollView();

            //Button and Resolution
            GUILayout.BeginVertical();
            XSStyles.doLabel("Resolution");

            GUILayout.BeginHorizontal();
            GUILayout.Space(175);
            res = (resolutions)EditorGUILayout.EnumPopup("", res);
            GUILayout.Space(175);
            GUILayout.EndHorizontal();

            if (GUILayout.Button("Merge Channels"))
            {
                if (progress < 2)
                {
                    EditorUtility.DisplayProgressBar("XSToon Texture Merger", "Merging and compressing new texture...", (float)(progress / 2));
                }

                //Set target textures to be ReadWriteable

                for (int i = 0; i < textures.Length; i++)
                {
                    if (textures[i] == null)
                    {
                        break;
                    }

                    string          texturePath = AssetDatabase.GetAssetPath(textures[i]);
                    TextureImporter texture     = (TextureImporter)TextureImporter.GetAtPath(texturePath);
                    if (texture != null)
                    {
                        texture.isReadable = true;
                        texture.SaveAndReimport();
                    }
                }

                switch (res)
                {
                case resolutions.Tiny_256x256:
                    resolution = 256;
                    break;

                case resolutions.Small_512x512:
                    resolution = 512;
                    break;

                case resolutions.Medium_1024x1024:
                    resolution = 1024;
                    break;

                case resolutions.Large_2048x2048:
                    resolution = 2048;
                    break;

                case resolutions.VeryLarge_4096x4096:
                    resolution = 4096;
                    break;

                case resolutions.Why_8192x8192:
                    resolution = 8192;
                    break;
                }

                XSStyles.findAssetPath(finalFilePath);
                finalFilePath = EditorUtility.SaveFilePanel("Save Merged Texture", finalFilePath + "/Textures/", "mergedTex.png", "png");


                Texture2D newTexture = new Texture2D(resolution, resolution, TextureFormat.RGBA32, false);

                //Get Colors textures and write them to the proper channel

                for (int y = 0; y < resolution; y++)
                {
                    for (int x = 0; x < resolution; x++)
                    {
                        float u = x / (float)resolution;
                        float v = y / (float)resolution;

                        // Grab out the texture values into an array for later lookup. Could probably just be done at the moment the texture color is needed.
                        for (int i = 0; i < textures.Length; i++)
                        {
                            if (textures[i] != null)
                            {
                                texColors[i] = textures[i].GetPixelBilinear(u, v);
                            }
                            else
                            {
                                texColors[i] = new Color(0, 0, 0, 1);
                            }
                        }

                        Color outputColor = new Color(0, 0, 0, 1);

                        // Iterate the output RGBA channels
                        for (int i = 0; i < 4; i++)
                        {
                            // Convert the enums to indices we can use. 'None' will turn into -1 which will be discarded as invalid.
                            int srcTexIdx     = ((int)pickTexture[i]) - 1;
                            int srcChannelIdx = ((int)texChannels[i]) - 1;

                            // Go through each channel in the output color and assign it
                            if (srcTexIdx >= 0 && srcChannelIdx >= 0)
                            {
                                outputColor[i] = texColors[srcTexIdx][srcChannelIdx];

                                //Allow you to invert specific channels.
                                if (invertChannel[i])
                                {
                                    outputColor[i] = 1f - outputColor[i];
                                }
                            }
                        }

                        newTexture.SetPixel(x, y, outputColor);
                    }
                }
                progress += 1;
                newTexture.Apply();
                ExportTexture(newTexture);
            }

            GUILayout.Space(10);
            GUILayout.EndVertical();



            EditorGUIUtility.labelWidth = oldLabelWidth;
        }
Exemplo n.º 9
0
        public void OnGUI()
        {
            tab = GUILayout.Toolbar(tab, new string[] { "Documentation", "Updater", "Social" });
            XSStyles.SeparatorThin();
            switch (tab)
            {
            case 0:
                //show Docs from git
                XSStyles.doLabel("You can find Documentation here.");
                if (GUILayout.Button("Open Documentation"))
                {
                    Application.OpenURL(docsURL);
                }

                break;

            case 1:
                EditorGUI.BeginChangeCheck();

                XSStyles.HelpBox("The currently installed version is: v" + XSStyles.ver + "\n\nTo check for updates, use the update button. If you choose to download an update, you will need to manually overwrite the old install by extracting the .zip into the project using the windows explorer. \n\nDo not drag the update directly into Unity - it won't ask to overwrite - it'll just create a duplicate and break.", MessageType.Info);
                XSStyles.SeparatorThin();
                if (GUILayout.Button("Check for Updates"))
                {
                    req(updateUrl);
                    EditorApplication.update += changelogEditorUpdate;
                    showInfo = true;
                }

                if (showInfo)
                {
                    scrollPos = EditorGUILayout.BeginScrollView(scrollPos);
                    Repaint();
                    XSStyles.doLabelLeft("Newest version: ");
                    XSStyles.doLabelSmall(curVer);
                    XSStyles.SeparatorThin();

                    XSStyles.doLabelLeft("Release Date: ");
                    XSStyles.doLabelSmall(publishdate);
                    XSStyles.SeparatorThin();

                    XSStyles.doLabelLeft("Changelog: ");
                    XSStyles.doLabelSmall(changelog);

                    EditorGUILayout.EndScrollView();
                    XSStyles.SeparatorThin();
                    if (GUILayout.Button("Download"))
                    {
                        Application.OpenURL(downloadLink);
                    }
                }
                else
                {
                    XSStyles.doLabel("Hit 'Check for Updates' to begin");
                }
                EditorGUI.EndChangeCheck();

                break;

            case 2:
                //show Patrons

                XSStyles.doLabel("Thank you to my patreon supporters, and the people who have helped me along the way, you guys are great!\n Note: You must be in the Discord server to show on this list.");
                XSStyles.SeparatorThin();
                XSStyles.doLabel("Current Patrons");
                XSStyles.SeparatorThin();
                scrollPos = EditorGUILayout.BeginScrollView(scrollPos);
                if (!hasCalledPatronlist)
                {
                    hasCalledPatronlist = true;
                    req(patronsURL);
                    EditorApplication.update += EditorUpdate;
                }
                for (int i = 0; i < patrons.Length; i++)
                {
                    XSStyles.doLabel(" - " + patrons[i]);
                }
                EditorGUILayout.EndScrollView();

                XSStyles.SeparatorThin();
                //show social links
                EditorGUILayout.BeginHorizontal();
                GUILayout.FlexibleSpace();
                XSStyles.discordButton(70, 30);
                XSStyles.patreonButton(70, 30);
                XSStyles.githubButton(70, 30);
                GUILayout.FlexibleSpace();
                EditorGUILayout.EndHorizontal();
                break;
            }
        }
Exemplo n.º 10
0
        private void DrawReflectionsSettings(MaterialEditor materialEditor, Material material)
        {
            showReflection = XSStyles.ShurikenFoldout("Reflections", showReflection);
            if (showReflection)
            {
                materialEditor.ShaderProperty(_ReflectionMode, new GUIContent("Reflection Mode", "Reflection Mode."));

                if (_ReflectionMode.floatValue == 0) // PBR
                {
                    materialEditor.ShaderProperty(_ReflectionBlendMode, new GUIContent("Reflection Blend Mode", "Blend mode for reflection. Additive is Color + reflection, Multiply is Color * reflection, and subtractive is Color - reflection"));
                    materialEditor.ShaderProperty(_ClearCoat, new GUIContent("Clearcoat", "Clearcoat"));

                    XSStyles.SeparatorThin();
                    materialEditor.TexturePropertySingleLine(new GUIContent("Fallback Cubemap", " Used as fallback in 'Unity' reflection mode if reflection probe is black."), _BakedCubemap);

                    XSStyles.SeparatorThin();
                    materialEditor.TexturePropertySingleLine(new GUIContent("Metallic Map", "Metallic Map, Metallic on Red Channel, Smoothness on Alpha Channel. \nIf Clearcoat is enabled, Clearcoat Smoothness on Green Channel, Clearcoat Reflectivity on Blue Channel."), _MetallicGlossMap);
                    materialEditor.TextureScaleOffsetProperty(_MetallicGlossMap);
                    materialEditor.ShaderProperty(_UVSetMetallic, new GUIContent("UV Set", "The UV set to use for the Metallic Smoothness Map"), 2);
                    materialEditor.ShaderProperty(_AnisotropicReflection, new GUIContent("Anisotropy", "The amount of anisotropy the surface has - this will stretch the reflection along an axis (think bottom of a frying pan)"), 2);
                    materialEditor.ShaderProperty(_Metallic, new GUIContent("Metallic", "Metallic, set to 1 if using metallic map"), 2);
                    materialEditor.ShaderProperty(_Glossiness, new GUIContent("Smoothness", "Smoothness, set to 1 if using metallic map"), 2);
                    materialEditor.ShaderProperty(_ClearcoatSmoothness, new GUIContent("Clearcoat Smoothness", "Smoothness of the clearcoat."), 2);
                    materialEditor.ShaderProperty(_ClearcoatStrength, new GUIContent("Clearcoat Reflectivity", "The strength of the clearcoat reflection."), 2);
                }
                else if (_ReflectionMode.floatValue == 1) //Baked cube
                {
                    materialEditor.ShaderProperty(_ReflectionBlendMode, new GUIContent("Reflection Blend Mode", "Blend mode for reflection. Additive is Color + reflection, Multiply is Color * reflection, and subtractive is Color - reflection"));
                    materialEditor.ShaderProperty(_ClearCoat, new GUIContent("Clearcoat", "Clearcoat"));

                    XSStyles.SeparatorThin();
                    materialEditor.TexturePropertySingleLine(new GUIContent("Baked Cubemap", "Baked cubemap."), _BakedCubemap);

                    XSStyles.SeparatorThin();
                    materialEditor.TexturePropertySingleLine(new GUIContent("Metallic Map", "Metallic Map, Metallic on Red Channel, Smoothness on Alpha Channel. \nIf Clearcoat is enabled, Clearcoat Smoothness on Green Channel, Clearcoat Reflectivity on Blue Channel."), _MetallicGlossMap);
                    materialEditor.TextureScaleOffsetProperty(_MetallicGlossMap);
                    materialEditor.ShaderProperty(_UVSetMetallic, new GUIContent("UV Set", "The UV set to use for the MetallicSmoothness Map"), 2);
                    materialEditor.ShaderProperty(_AnisotropicReflection, new GUIContent("Anisotropic", "Anisotropic, stretches reflection in an axis."), 2);
                    materialEditor.ShaderProperty(_Metallic, new GUIContent("Metallic", "Metallic, set to 1 if using metallic map"), 2);
                    materialEditor.ShaderProperty(_Glossiness, new GUIContent("Smoothness", "Smoothness, set to 1 if using metallic map"), 2);
                    materialEditor.ShaderProperty(_ClearcoatSmoothness, new GUIContent("Clearcoat Smoothness", "Smoothness of the clearcoat."), 2);
                    materialEditor.ShaderProperty(_ClearcoatStrength, new GUIContent("Clearcoat Reflectivity", "The strength of the clearcoat reflection."), 2);
                }
                else if (_ReflectionMode.floatValue == 2) //Matcap
                {
                    materialEditor.ShaderProperty(_ReflectionBlendMode, new GUIContent("Reflection Blend Mode", "Blend mode for reflection. Additive is Color + reflection, Multiply is Color * reflection, and subtractive is Color - reflection"));

                    XSStyles.SeparatorThin();
                    materialEditor.TexturePropertySingleLine(new GUIContent("Matcap", "Matcap Texture"), _Matcap, _MatcapTint);
                    materialEditor.ShaderProperty(_Glossiness, new GUIContent("Matcap Blur", "Matcap blur, blurs the Matcap, set to 1 for full clarity"), 2);
                    materialEditor.ShaderProperty(_MatcapTintToDiffuse, new GUIContent("Tint To Diffuse", "Tints matcap to diffuse color."), 2);
                    material.SetFloat("_Metallic", 0);
                    material.SetFloat("_ClearCoat", 0);
                    material.SetTexture("_MetallicGlossMap", null);
                }
                if (_ReflectionMode.floatValue != 3)
                {
                    XSStyles.SeparatorThin();
                    materialEditor.TexturePropertySingleLine(new GUIContent("Reflectivity Mask", "Mask for reflections."), _ReflectivityMask);
                    materialEditor.TextureScaleOffsetProperty(_ReflectivityMask);
                    materialEditor.ShaderProperty(_UVSetReflectivity, new GUIContent("UV Set", "The UV set to use for the Reflectivity Mask"), 2);
                    materialEditor.ShaderProperty(_Reflectivity, new GUIContent("Reflectivity", "The strength of the reflections."), 2);
                }
                if (_ReflectionMode.floatValue == 3)
                {
                    material.SetFloat("_Metallic", 0);
                    material.SetFloat("_ReflectionBlendMode", 0);
                    material.SetFloat("_ClearCoat", 0);
                }
            }
        }