Exemple #1
0
 private void DoUnderlayPanel()
 {
     EditorGUI.indentLevel++;
     underlayFeature.DoPopup(editor, material);
     DoColor("_UnderlayColor", "Color");
     DoSlider("_UnderlayOffsetX", "Offset X");
     DoSlider("_UnderlayOffsetY", "Offset Y");
     DoSlider("_UnderlayDilate", "Dilate");
     DoSlider("_UnderlaySoftness", "Softness");
     EditorGUI.indentLevel--;
 }
Exemple #2
0
        private void DoDebugPanel()
        {
            EditorGUI.indentLevel++;
            DoTexture2D("_MainTex", "Font Atlas");
            DoFloat("_GradientScale", "Gradient Scale");
            DoFloat("_TextureWidth", "Texture Width");
            DoFloat("_TextureHeight", "Texture Height");
            DoEmptyLine();
            DoFloat("_ScaleX", "Scale X");
            DoFloat("_ScaleY", "Scale Y");
            DoSlider("_PerspectiveFilter", "Perspective Filter");
            DoEmptyLine();
            DoFloat("_VertexOffsetX", "Offset X");
            DoFloat("_VertexOffsetY", "Offset Y");
            if (material.HasProperty(ShaderUtilities.ID_MaskCoord))
            {
                DoEmptyLine();
                maskFeature.ReadState(material);
                maskFeature.DoPopup(editor, material);
                if (maskFeature.Active)
                {
                    DoMaskSubgroup();
                }
                DoEmptyLine();
                DoVector("_ClipRect", "Clip Rect", TMP_BaseShaderGUI.lbrtVectorLabels);
            }
            else if (material.HasProperty("_MaskTex"))
            {
                DoMaskTexSubgroup();
            }
            else if (material.HasProperty(ShaderUtilities.ID_MaskSoftnessX))
            {
                DoEmptyLine();
                DoFloat("_MaskSoftnessX", "Softness X");
                DoFloat("_MaskSoftnessY", "Softness Y");
                DoVector("_ClipRect", "Clip Rect", TMP_BaseShaderGUI.lbrtVectorLabels);
            }
            if (material.HasProperty(ShaderUtilities.ID_StencilID))
            {
                DoEmptyLine();
                DoFloat("_Stencil", "Stencil ID");
                DoFloat("_StencilComp", "Stencil Comp");
            }
            DoEmptyLine();
            EditorGUI.BeginChangeCheck();
            bool flag = EditorGUILayout.Toggle("Use Ratios?", !material.IsKeywordEnabled("RATIOS_OFF"));

            if (EditorGUI.EndChangeCheck())
            {
                editor.RegisterPropertyChangeUndo("Use Ratios");
                if (flag)
                {
                    material.DisableKeyword("RATIOS_OFF");
                }
                else
                {
                    material.EnableKeyword("RATIOS_OFF");
                }
            }
            EditorGUI.BeginDisabledGroup(true);
            DoFloat("_ScaleRatioA", "Scale Ratio A");
            DoFloat("_ScaleRatioB", "Scale Ratio B");
            DoFloat("_ScaleRatioC", "Scale Ratio C");
            EditorGUI.EndDisabledGroup();
            EditorGUI.indentLevel--;
        }