コード例 #1
0
        internal static TierSettings GetTierSettingsImpl(BuildTargetGroup target, GraphicsTier tier)
        {
            TierSettings settings;

            INTERNAL_CALL_GetTierSettingsImpl(target, tier, out settings);
            return(settings);
        }
コード例 #2
0
            internal void OnGuiVertical(BuildTargetGroup platform)
            {
                EditorGUILayout.BeginHorizontal(new GUILayoutOption[0]);
                EditorGUILayout.BeginVertical(new GUILayoutOption[0]);
                EditorGUIUtility.labelWidth = 140f;
                EditorGUILayout.LabelField(GraphicsSettingsWindow.TierSettingsEditor.Styles.empty, EditorStyles.boldLabel, new GUILayoutOption[0]);
                this.OnFieldLabelsGUI();
                EditorGUILayout.EndVertical();
                EditorGUIUtility.labelWidth = 50f;
                IEnumerator enumerator = Enum.GetValues(typeof(GraphicsTier)).GetEnumerator();

                try
                {
                    while (enumerator.MoveNext())
                    {
                        GraphicsTier graphicsTier = (GraphicsTier)enumerator.Current;
                        EditorGUILayout.BeginVertical(new GUILayoutOption[0]);
                        EditorGUILayout.LabelField(GraphicsSettingsWindow.TierSettingsEditor.Styles.tierName[(int)graphicsTier], EditorStyles.boldLabel, new GUILayoutOption[0]);
                        this.OnTierGUI(platform, graphicsTier);
                        EditorGUILayout.EndVertical();
                    }
                }
                finally
                {
                    IDisposable disposable;
                    if ((disposable = (enumerator as IDisposable)) != null)
                    {
                        disposable.Dispose();
                    }
                }
                EditorGUIUtility.labelWidth = 0f;
                EditorGUILayout.EndHorizontal();
            }
コード例 #3
0
 public TierSettings(PlatformShaderSettings settings, Platform platfrom, GraphicsTier tier, Version version, TransferInstructionFlags flags)
 {
     BuildTarget = platfrom.PlatformToBuildGroup();
     Tier        = tier;
     Settings    = new TierGraphicsSettingsEditor(settings, version, flags);
     Automatic   = false;
 }
コード例 #4
0
            internal void OnTierGUI(BuildTargetGroup platform, GraphicsTier tier, bool vertical)
            {
                TierSettings tierSettings = EditorGraphicsSettings.GetTierSettings(platform, tier);

                EditorGUI.BeginChangeCheck();
                if (!vertical)
                {
                    EditorGUILayout.LabelField(GraphicsSettingsWindow.TierSettingsEditor.Styles.empty, EditorStyles.boldLabel, new GUILayoutOption[0]);
                }
                tierSettings.standardShaderQuality        = this.ShaderQualityPopup(tierSettings.standardShaderQuality);
                tierSettings.reflectionProbeBoxProjection = EditorGUILayout.Toggle(tierSettings.reflectionProbeBoxProjection, new GUILayoutOption[0]);
                tierSettings.reflectionProbeBlending      = EditorGUILayout.Toggle(tierSettings.reflectionProbeBlending, new GUILayoutOption[0]);
                tierSettings.detailNormalMap        = EditorGUILayout.Toggle(tierSettings.detailNormalMap, new GUILayoutOption[0]);
                tierSettings.semitransparentShadows = EditorGUILayout.Toggle(tierSettings.semitransparentShadows, new GUILayoutOption[0]);
                tierSettings.enableLPPV             = EditorGUILayout.Toggle(tierSettings.enableLPPV, new GUILayoutOption[0]);
                if (!vertical)
                {
                    EditorGUILayout.LabelField(GraphicsSettingsWindow.TierSettingsEditor.Styles.empty, EditorStyles.boldLabel, new GUILayoutOption[0]);
                    EditorGUILayout.LabelField(GraphicsSettingsWindow.TierSettingsEditor.Styles.empty, EditorStyles.boldLabel, new GUILayoutOption[0]);
                }
                tierSettings.cascadedShadowMaps    = EditorGUILayout.Toggle(tierSettings.cascadedShadowMaps, new GUILayoutOption[0]);
                tierSettings.prefer32BitShadowMaps = EditorGUILayout.Toggle(tierSettings.prefer32BitShadowMaps, new GUILayoutOption[0]);
                tierSettings.hdr                = EditorGUILayout.Toggle(tierSettings.hdr, new GUILayoutOption[0]);
                tierSettings.hdrMode            = this.HDRModePopup(tierSettings.hdrMode);
                tierSettings.renderingPath      = this.RenderingPathPopup(tierSettings.renderingPath);
                tierSettings.realtimeGICPUUsage = this.RealtimeGICPUUsagePopup(tierSettings.realtimeGICPUUsage);
                if (EditorGUI.EndChangeCheck())
                {
                    EditorGraphicsSettings.RegisterUndoForGraphicsSettings();
                    EditorGraphicsSettings.SetTierSettings(platform, tier, tierSettings);
                }
            }
コード例 #5
0
        internal static TierSettings GetTierSettingsImpl(BuildTargetGroup target, GraphicsTier tier)
        {
            TierSettings result;

            EditorGraphicsSettings.INTERNAL_CALL_GetTierSettingsImpl(target, tier, out result);
            return(result);
        }
コード例 #6
0
 public TierSettings(TierGraphicsSettings settings, Platform platfrom, GraphicsTier tier)
 {
     BuildTarget = platfrom.PlatformToBuildGroup();
     Tier        = tier;
     Settings    = new TierGraphicsSettingsEditor(settings);
     Automatic   = false;
 }
コード例 #7
0
 public static void SetTierSettings(BuildTargetGroup target, GraphicsTier tier, TierSettings settings)
 {
     if (settings.renderingPath == RenderingPath.UsePlayerSettings)
     {
         throw new ArgumentException("TierSettings.renderingPath must be actual rendering path (not UsePlayerSettings)", "settings");
     }
     SetTierSettingsImpl(target, tier, settings);
     OnUpdateTierSettingsImpl(target, true);
 }
コード例 #8
0
            internal void OnGuiVertical(BuildTargetGroup platform)
            {
                IEnumerator enumerator = Enum.GetValues(typeof(GraphicsTier)).GetEnumerator();

                try
                {
                    while (enumerator.MoveNext())
                    {
                        GraphicsTier graphicsTier = (GraphicsTier)enumerator.Current;
                        bool         flag         = EditorGraphicsSettings.AreTierSettingsAutomatic(platform, graphicsTier);
                        EditorGUI.BeginChangeCheck();
                        GUILayout.BeginHorizontal(new GUILayoutOption[0]);
                        EditorGUIUtility.labelWidth = 80f;
                        EditorGUILayout.LabelField(GraphicsSettingsWindow.TierSettingsEditor.Styles.tierName[(int)graphicsTier], EditorStyles.boldLabel, new GUILayoutOption[0]);
                        GUILayout.FlexibleSpace();
                        EditorGUIUtility.labelWidth = 75f;
                        flag = EditorGUILayout.Toggle(GraphicsSettingsWindow.TierSettingsEditor.Styles.autoSettings, flag, new GUILayoutOption[0]);
                        GUILayout.EndHorizontal();
                        if (EditorGUI.EndChangeCheck())
                        {
                            EditorGraphicsSettings.RegisterUndoForGraphicsSettings();
                            EditorGraphicsSettings.MakeTierSettingsAutomatic(platform, graphicsTier, flag);
                            EditorGraphicsSettings.OnUpdateTierSettingsImpl(platform, true);
                        }
                        using (new EditorGUI.DisabledScope(flag))
                        {
                            EditorGUI.indentLevel++;
                            EditorGUILayout.BeginHorizontal(new GUILayoutOption[0]);
                            EditorGUILayout.BeginVertical(new GUILayoutOption[0]);
                            EditorGUIUtility.labelWidth = 140f;
                            this.OnFieldLabelsGUI(true);
                            EditorGUILayout.EndVertical();
                            EditorGUILayout.BeginVertical(new GUILayoutOption[0]);
                            EditorGUIUtility.labelWidth = 50f;
                            this.OnTierGUI(platform, graphicsTier, true);
                            EditorGUILayout.EndVertical();
                            GUILayout.EndHorizontal();
                            EditorGUI.indentLevel--;
                        }
                    }
                }
                finally
                {
                    IDisposable disposable;
                    if ((disposable = (enumerator as IDisposable)) != null)
                    {
                        disposable.Dispose();
                    }
                }
                EditorGUIUtility.labelWidth = 0f;
            }
コード例 #9
0
            internal void OnTierGUI(BuildTargetGroup platform, GraphicsTier tier)
            {
                TierSettings tierSettings = EditorGraphicsSettings.GetTierSettings(platform, tier);

                EditorGUI.BeginChangeCheck();
                tierSettings.cascadedShadowMaps           = EditorGUILayout.Toggle(tierSettings.cascadedShadowMaps, new GUILayoutOption[0]);
                tierSettings.standardShaderQuality        = this.ShaderQualityPopup(tierSettings.standardShaderQuality);
                tierSettings.reflectionProbeBoxProjection = EditorGUILayout.Toggle(tierSettings.reflectionProbeBoxProjection, new GUILayoutOption[0]);
                tierSettings.reflectionProbeBlending      = EditorGUILayout.Toggle(tierSettings.reflectionProbeBlending, new GUILayoutOption[0]);
                tierSettings.renderingPath = this.RenderingPathPopup(tierSettings.renderingPath);
                if (EditorGUI.EndChangeCheck())
                {
                    EditorGraphicsSettings.RegisterUndoForGraphicsSettings();
                    EditorGraphicsSettings.SetTierSettings(platform, tier, tierSettings);
                }
            }
コード例 #10
0
        public bool ShouldStrip(GraphicsTier tier)
        {
            switch (tier)
            {
            case GraphicsTier.Tier1:
                return(stripTier1);

            case GraphicsTier.Tier2:
                return(stripTier2);

            case GraphicsTier.Tier3:
                return(stripTier3);
            }

            return(false);
        }
コード例 #11
0
 internal static void SetTierSettingsImpl(BuildTargetGroup target, GraphicsTier tier, TierSettings settings)
 {
     INTERNAL_CALL_SetTierSettingsImpl(target, tier, ref settings);
 }
コード例 #12
0
 public static void SetTierSettings(BuildTargetGroup target, GraphicsTier tier, TierSettings settings)
 {
     if (settings.renderingPath == RenderingPath.UsePlayerSettings)
     {
         throw new ArgumentException("TierSettings.renderingPath must be actual rendering path (not UsePlayerSettings)", "settings");
     }
     SetTierSettingsImpl(target, tier, settings);
     OnUpdateTierSettingsImpl(target, true);
 }
コード例 #13
0
 internal static extern bool AreTierSettingsAutomatic(BuildTargetGroup target, GraphicsTier tier);
コード例 #14
0
 internal void OnTierGUI(BuildTargetGroup platform, GraphicsTier tier)
 {
     TierSettings tierSettings = EditorGraphicsSettings.GetTierSettings(platform, tier);
     EditorGUI.BeginChangeCheck();
     tierSettings.cascadedShadowMaps = EditorGUILayout.Toggle(tierSettings.cascadedShadowMaps, new GUILayoutOption[0]);
     tierSettings.standardShaderQuality = this.ShaderQualityPopup(tierSettings.standardShaderQuality);
     tierSettings.reflectionProbeBoxProjection = EditorGUILayout.Toggle(tierSettings.reflectionProbeBoxProjection, new GUILayoutOption[0]);
     tierSettings.reflectionProbeBlending = EditorGUILayout.Toggle(tierSettings.reflectionProbeBlending, new GUILayoutOption[0]);
     tierSettings.renderingPath = this.RenderingPathPopup(tierSettings.renderingPath);
     if (EditorGUI.EndChangeCheck())
     {
         EditorGraphicsSettings.RegisterUndoForGraphicsSettings();
         EditorGraphicsSettings.SetTierSettings(platform, tier, tierSettings);
     }
 }
コード例 #15
0
 internal static void SetTierSettingsImpl(BuildTargetGroup target, GraphicsTier tier, TierSettings settings)
 {
     EditorGraphicsSettings.INTERNAL_CALL_SetTierSettingsImpl(target, tier, ref settings);
 }
コード例 #16
0
ファイル: ShaderUtil.cs プロジェクト: leek9d/UnityCsReference
 public VariantCompileInfo CompileVariant(ShaderType shaderType, string[] keywords,
                                          ShaderCompilerPlatform shaderCompilerPlatform, BuildTarget buildTarget, BuiltinShaderDefine[] platformKeywords, GraphicsTier tier, bool forExternalTool)
 {
     return(ShaderUtil.CompileShaderVariant(SourceShader, SubshaderIndex, m_PassIndex, shaderType, platformKeywords, keywords, shaderCompilerPlatform, buildTarget, tier, forExternalTool));
 }
コード例 #17
0
 public static TierSettings GetTierSettings(NamedBuildTarget target, GraphicsTier tier) => GetTierSettings(target.ToBuildTargetGroup(), tier);
コード例 #18
0
 internal static TierSettings GetTierSettingsImpl(BuildTargetGroup target, GraphicsTier tier)
 {
     TierSettings settings;
     INTERNAL_CALL_GetTierSettingsImpl(target, tier, out settings);
     return settings;
 }
コード例 #19
0
 private extern static void INTERNAL_CALL_GetTierSettingsImpl(BuildTargetGroup target, GraphicsTier tier, out TierGraphicsSettingsEditorScript value);
コード例 #20
0
 private extern static void INTERNAL_CALL_SetTierSettingsImpl(BuildTargetGroup target, GraphicsTier tier, ref TierGraphicsSettingsEditorScript settings);
コード例 #21
0
 public static bool HasShaderDefine(GraphicsTier tier, BuiltinShaderDefine defineHash)
 {
     return(HasShaderDefineImpl(tier, defineHash));
 }
コード例 #22
0
 private static extern void INTERNAL_CALL_GetTierSettingsImpl(BuildTargetGroup target, GraphicsTier tier, out TierSettings value);
コード例 #23
0
 private static extern void INTERNAL_CALL_SetTierSettingsImpl(BuildTargetGroup target, GraphicsTier tier, ref TierSettings settings);
コード例 #24
0
 [NativeName("SetTierSettings")] extern internal static void SetTierSettingsImpl(BuildTargetGroup target, GraphicsTier tier, TierSettings settings);
コード例 #25
0
 public static TierSettings GetTierSettings(BuildTargetGroup target, GraphicsTier tier)
 {
     return(EditorGraphicsSettings.GetTierSettingsImpl(target, tier));
 }
コード例 #26
0
 extern public static TierSettings GetTierSettings(BuildTargetGroup target, GraphicsTier tier);
コード例 #27
0
 public static TierSettings GetTierSettings(BuildTargetGroup target, GraphicsTier tier)
 {
     return GetTierSettingsImpl(target, tier);
 }
コード例 #28
0
ファイル: ShaderUtil.cs プロジェクト: leek9d/UnityCsReference
 public VariantCompileInfo CompileVariant(ShaderType shaderType, string[] keywords,
                                          ShaderCompilerPlatform shaderCompilerPlatform, BuildTarget buildTarget, BuiltinShaderDefine[] platformKeywords, GraphicsTier tier)
 {
     return(CompileVariant(shaderType, keywords, shaderCompilerPlatform, buildTarget, platformKeywords, tier, false));
 }
コード例 #29
0
 extern public static BuiltinShaderDefine[] GetShaderPlatformKeywordsForBuildTarget(ShaderCompilerPlatform shaderCompilerPlatform, BuildTarget buildTarget, GraphicsTier tier);
コード例 #30
0
ファイル: ShaderUtil.cs プロジェクト: leek9d/UnityCsReference
 public PreprocessedVariant PreprocessVariant(ShaderType shaderType, string[] keywords,
                                              ShaderCompilerPlatform shaderCompilerPlatform, BuildTarget buildTarget, BuiltinShaderDefine[] platformKeywords, GraphicsTier tier, bool stripLineDirectives)
 {
     return(ShaderUtil.PreprocessShaderVariant(SourceShader, SubshaderIndex, m_PassIndex, shaderType, platformKeywords, keywords, shaderCompilerPlatform, buildTarget, tier, stripLineDirectives));
 }
コード例 #31
0
 extern internal static ShaderData.VariantCompileInfo CompileShaderVariant([NotNull] Shader shader, int subShaderIndex, int passId,
                                                                           ShaderType shaderType, BuiltinShaderDefine[] platformKeywords, string[] keywords, ShaderCompilerPlatform shaderCompilerPlatform, BuildTarget buildTarget, GraphicsTier tier, bool outputForExternalTool);
コード例 #32
0
 private static extern void INTERNAL_CALL_SetTierSettingsImpl(BuildTargetGroup target, GraphicsTier tier, ref TierSettings settings);
コード例 #33
0
 extern internal static ShaderData.PreprocessedVariant PreprocessShaderVariant([NotNull] Shader shader, int subShaderIndex, int passId,
                                                                               ShaderType shaderType, BuiltinShaderDefine[] platformKeywords, string[] keywords, ShaderCompilerPlatform shaderCompilerPlatform, BuildTarget buildTarget, GraphicsTier tier, bool stripLineDirectives);
コード例 #34
0
 private static extern void INTERNAL_CALL_GetTierSettingsImpl(BuildTargetGroup target, GraphicsTier tier, out TierSettings value);
コード例 #35
0
 internal static extern bool AreTierSettingsAutomatic(BuildTargetGroup target, GraphicsTier tier);
コード例 #36
0
 internal static extern void MakeTierSettingsAutomatic(BuildTargetGroup target, GraphicsTier tier, bool automatic);
コード例 #37
0
 internal static extern void MakeTierSettingsAutomatic(BuildTargetGroup target, GraphicsTier tier, bool automatic);
コード例 #38
0
 extern public static bool HasShaderDefine(GraphicsTier tier, BuiltinShaderDefine defineHash);
コード例 #39
0
ファイル: ShaderUtil.cs プロジェクト: Mu-L/UnityCsReference
            public VariantCompileInfo CompileVariant(ShaderType shaderType, string[] keywords,
                                                     ShaderCompilerPlatform shaderCompilerPlatform, BuildTarget buildTarget, GraphicsTier tier)
            {
                var platformKeywords = ShaderUtil.GetShaderPlatformKeywordsForBuildTarget(shaderCompilerPlatform, buildTarget, tier);

                return(ShaderUtil.CompileShaderVariant(SourceShader, SubshaderIndex, m_PassIndex, shaderType, platformKeywords, keywords, shaderCompilerPlatform, buildTarget, tier));
            }