按键绑定功能
This commit is contained in:
@@ -221,6 +221,15 @@
|
||||
"interactions": "",
|
||||
"initialStateCheck": false
|
||||
},
|
||||
{
|
||||
"name": "OpenQuick",
|
||||
"type": "Button",
|
||||
"id": "1b9b87d1-77ad-46ac-b39f-94ca5633b23d",
|
||||
"expectedControlType": "",
|
||||
"processors": "",
|
||||
"interactions": "",
|
||||
"initialStateCheck": false
|
||||
},
|
||||
{
|
||||
"name": "Quick1",
|
||||
"type": "Button",
|
||||
@@ -893,6 +902,17 @@
|
||||
"action": "Use2",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "cf3a4ade-205f-4ae1-914f-4126358122cf",
|
||||
"path": "<Keyboard>/0",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "",
|
||||
"action": "OpenQuick",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.5 MiB After Width: | Height: | Size: 1.5 MiB |
Binary file not shown.
Binary file not shown.
@@ -1,6 +1,21 @@
|
||||
namespace NBF.Setting
|
||||
using UnityEngine.InputSystem;
|
||||
|
||||
namespace NBF.Setting
|
||||
{
|
||||
public abstract class InputOption : OptionBase
|
||||
{
|
||||
public abstract InputAction InputAction { get; }
|
||||
|
||||
protected override int DefaultValue => 0;
|
||||
|
||||
public override string GetDisplayString()
|
||||
{
|
||||
if (InputAction != null)
|
||||
{
|
||||
return InputAction.GetBindingDisplayString();
|
||||
}
|
||||
|
||||
return base.GetDisplayString();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,9 @@
|
||||
namespace NBF.Setting
|
||||
using UnityEngine.InputSystem;
|
||||
|
||||
namespace NBF.Setting
|
||||
{
|
||||
public abstract class KeyBoardOption : InputOption
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,17 +1,17 @@
|
||||
namespace NBF.Setting
|
||||
using UnityEngine.InputSystem;
|
||||
|
||||
namespace NBF.Setting
|
||||
{
|
||||
public class InputAddBobSetting : KeyBoardOption
|
||||
{
|
||||
private int _defaultKey;
|
||||
public override string Name => "InputAddBob";
|
||||
public override string Group => SettingsDef.Group.Keyboard;
|
||||
public override string Tab => SettingsDef.Tab.Keyboard;
|
||||
|
||||
protected override int DefaultValue => _defaultKey;
|
||||
public override InputAction InputAction => InputManager.PlayerInputControl.Player.AddBob;
|
||||
|
||||
protected override void OnApply()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
using UnityEngine.InputSystem;
|
||||
|
||||
namespace NBF.Setting
|
||||
{
|
||||
public class InputChatSetting : KeyBoardOption
|
||||
{
|
||||
private int _defaultKey;
|
||||
public override string Name => "InputChat";
|
||||
public override string Group => SettingsDef.Group.Keyboard;
|
||||
public override string Tab => SettingsDef.Tab.Keyboard;
|
||||
|
||||
public override InputAction InputAction => InputManager.PlayerInputControl.Player.Chat;
|
||||
|
||||
protected override void OnApply()
|
||||
{
|
||||
// PlayerInputControl.PlayerActions
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a63f66ee0a384cf0a163c33dfa2f3c36
|
||||
timeCreated: 1750308320
|
||||
@@ -0,0 +1,18 @@
|
||||
using UnityEngine.InputSystem;
|
||||
|
||||
namespace NBF.Setting
|
||||
{
|
||||
public class InputHelpSetting : KeyBoardOption
|
||||
{
|
||||
public override string Name => "InputHelp";
|
||||
public override string Group => SettingsDef.Group.Keyboard;
|
||||
public override string Tab => SettingsDef.Tab.Keyboard;
|
||||
|
||||
public override InputAction InputAction => InputManager.PlayerInputControl.Player.Help;
|
||||
|
||||
protected override void OnApply()
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7b77e15344964a9ab0b1ecafcad3d03d
|
||||
timeCreated: 1750308298
|
||||
@@ -0,0 +1,17 @@
|
||||
using UnityEngine.InputSystem;
|
||||
|
||||
namespace NBF.Setting
|
||||
{
|
||||
public class InputSubBobSetting : KeyBoardOption
|
||||
{
|
||||
public override string Name => "InputSubBob";
|
||||
public override string Group => SettingsDef.Group.Keyboard;
|
||||
public override string Tab => SettingsDef.Tab.Keyboard;
|
||||
|
||||
public override InputAction InputAction => InputManager.PlayerInputControl.Player.SubBob;
|
||||
|
||||
protected override void OnApply()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ea72a2c910474d5ca4e96d2c881797d8
|
||||
timeCreated: 1750307386
|
||||
@@ -0,0 +1,17 @@
|
||||
using UnityEngine.InputSystem;
|
||||
|
||||
namespace NBF.Setting
|
||||
{
|
||||
public class InputToBagSetting : KeyBoardOption
|
||||
{
|
||||
public override string Name => "InputToBag";
|
||||
public override string Group => SettingsDef.Group.Keyboard;
|
||||
public override string Tab => SettingsDef.Tab.Keyboard;
|
||||
|
||||
public override InputAction InputAction => InputManager.PlayerInputControl.Player.ToBag;
|
||||
|
||||
protected override void OnApply()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 906eac0772874939a5223e1115d5dfe0
|
||||
timeCreated: 1750308244
|
||||
@@ -0,0 +1,19 @@
|
||||
using UnityEngine.InputSystem;
|
||||
|
||||
namespace NBF.Setting
|
||||
{
|
||||
public class InputUseTelescopeSetting : KeyBoardOption
|
||||
{
|
||||
public override string Name => "InputUseTelescope";
|
||||
public override string Group => SettingsDef.Group.Keyboard;
|
||||
public override string Tab => SettingsDef.Tab.Keyboard;
|
||||
|
||||
public override InputAction InputAction => InputManager.PlayerInputControl.Player.UseTelescope;
|
||||
|
||||
protected override void OnApply()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 24089404fdb7424284ecafcd23d1537f
|
||||
timeCreated: 1750308215
|
||||
@@ -0,0 +1,18 @@
|
||||
using UnityEngine.InputSystem;
|
||||
|
||||
namespace NBF.Setting
|
||||
{
|
||||
public class InputUseTorchSetting : KeyBoardOption
|
||||
{
|
||||
public override string Name => "InputUseTorch";
|
||||
public override string Group => SettingsDef.Group.Keyboard;
|
||||
public override string Tab => SettingsDef.Tab.Keyboard;
|
||||
|
||||
public override InputAction InputAction => InputManager.PlayerInputControl.Player.UseTorch;
|
||||
|
||||
protected override void OnApply()
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 12a79769a6534afa8212293adfa1e48a
|
||||
timeCreated: 1750307422
|
||||
@@ -309,6 +309,15 @@ namespace NBF
|
||||
""interactions"": """",
|
||||
""initialStateCheck"": false
|
||||
},
|
||||
{
|
||||
""name"": ""OpenQuick"",
|
||||
""type"": ""Button"",
|
||||
""id"": ""1b9b87d1-77ad-46ac-b39f-94ca5633b23d"",
|
||||
""expectedControlType"": """",
|
||||
""processors"": """",
|
||||
""interactions"": """",
|
||||
""initialStateCheck"": false
|
||||
},
|
||||
{
|
||||
""name"": ""Quick1"",
|
||||
""type"": ""Button"",
|
||||
@@ -981,6 +990,17 @@ namespace NBF
|
||||
""action"": ""Use2"",
|
||||
""isComposite"": false,
|
||||
""isPartOfComposite"": false
|
||||
},
|
||||
{
|
||||
""name"": """",
|
||||
""id"": ""cf3a4ade-205f-4ae1-914f-4126358122cf"",
|
||||
""path"": ""<Keyboard>/0"",
|
||||
""interactions"": """",
|
||||
""processors"": """",
|
||||
""groups"": """",
|
||||
""action"": ""OpenQuick"",
|
||||
""isComposite"": false,
|
||||
""isPartOfComposite"": false
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -1511,6 +1531,7 @@ namespace NBF
|
||||
m_Player_Keepnet = m_Player.FindAction("Keepnet", throwIfNotFound: true);
|
||||
m_Player_Make = m_Player.FindAction("Make", throwIfNotFound: true);
|
||||
m_Player_Map = m_Player.FindAction("Map", throwIfNotFound: true);
|
||||
m_Player_OpenQuick = m_Player.FindAction("OpenQuick", throwIfNotFound: true);
|
||||
m_Player_Quick1 = m_Player.FindAction("Quick1", throwIfNotFound: true);
|
||||
m_Player_Quick2 = m_Player.FindAction("Quick2", throwIfNotFound: true);
|
||||
m_Player_Quick3 = m_Player.FindAction("Quick3", throwIfNotFound: true);
|
||||
@@ -1640,6 +1661,7 @@ namespace NBF
|
||||
private readonly InputAction m_Player_Keepnet;
|
||||
private readonly InputAction m_Player_Make;
|
||||
private readonly InputAction m_Player_Map;
|
||||
private readonly InputAction m_Player_OpenQuick;
|
||||
private readonly InputAction m_Player_Quick1;
|
||||
private readonly InputAction m_Player_Quick2;
|
||||
private readonly InputAction m_Player_Quick3;
|
||||
@@ -1759,6 +1781,10 @@ namespace NBF
|
||||
/// </summary>
|
||||
public InputAction @Map => m_Wrapper.m_Player_Map;
|
||||
/// <summary>
|
||||
/// Provides access to the underlying input action "Player/OpenQuick".
|
||||
/// </summary>
|
||||
public InputAction @OpenQuick => m_Wrapper.m_Player_OpenQuick;
|
||||
/// <summary>
|
||||
/// Provides access to the underlying input action "Player/Quick1".
|
||||
/// </summary>
|
||||
public InputAction @Quick1 => m_Wrapper.m_Player_Quick1;
|
||||
@@ -1900,6 +1926,9 @@ namespace NBF
|
||||
@Map.started += instance.OnMap;
|
||||
@Map.performed += instance.OnMap;
|
||||
@Map.canceled += instance.OnMap;
|
||||
@OpenQuick.started += instance.OnOpenQuick;
|
||||
@OpenQuick.performed += instance.OnOpenQuick;
|
||||
@OpenQuick.canceled += instance.OnOpenQuick;
|
||||
@Quick1.started += instance.OnQuick1;
|
||||
@Quick1.performed += instance.OnQuick1;
|
||||
@Quick1.canceled += instance.OnQuick1;
|
||||
@@ -2016,6 +2045,9 @@ namespace NBF
|
||||
@Map.started -= instance.OnMap;
|
||||
@Map.performed -= instance.OnMap;
|
||||
@Map.canceled -= instance.OnMap;
|
||||
@OpenQuick.started -= instance.OnOpenQuick;
|
||||
@OpenQuick.performed -= instance.OnOpenQuick;
|
||||
@OpenQuick.canceled -= instance.OnOpenQuick;
|
||||
@Quick1.started -= instance.OnQuick1;
|
||||
@Quick1.performed -= instance.OnQuick1;
|
||||
@Quick1.canceled -= instance.OnQuick1;
|
||||
@@ -2529,6 +2561,13 @@ namespace NBF
|
||||
/// <seealso cref="UnityEngine.InputSystem.InputAction.canceled" />
|
||||
void OnMap(InputAction.CallbackContext context);
|
||||
/// <summary>
|
||||
/// Method invoked when associated input action "OpenQuick" is either <see cref="UnityEngine.InputSystem.InputAction.started" />, <see cref="UnityEngine.InputSystem.InputAction.performed" /> or <see cref="UnityEngine.InputSystem.InputAction.canceled" />.
|
||||
/// </summary>
|
||||
/// <seealso cref="UnityEngine.InputSystem.InputAction.started" />
|
||||
/// <seealso cref="UnityEngine.InputSystem.InputAction.performed" />
|
||||
/// <seealso cref="UnityEngine.InputSystem.InputAction.canceled" />
|
||||
void OnOpenQuick(InputAction.CallbackContext context);
|
||||
/// <summary>
|
||||
/// Method invoked when associated input action "Quick1" is either <see cref="UnityEngine.InputSystem.InputAction.started" />, <see cref="UnityEngine.InputSystem.InputAction.performed" /> or <see cref="UnityEngine.InputSystem.InputAction.canceled" />.
|
||||
/// </summary>
|
||||
/// <seealso cref="UnityEngine.InputSystem.InputAction.started" />
|
||||
|
||||
@@ -8,6 +8,8 @@ namespace NBF
|
||||
{
|
||||
public static void BindAll()
|
||||
{
|
||||
UIObjectFactory.SetPackageItemExtension(KeyboardInput.URL, typeof(KeyboardInput));
|
||||
UIObjectFactory.SetPackageItemExtension(SettingInputItem.URL, typeof(SettingInputItem));
|
||||
UIObjectFactory.SetPackageItemExtension(SettingItem.URL, typeof(SettingItem));
|
||||
UIObjectFactory.SetPackageItemExtension(IntroduceTag.URL, typeof(IntroduceTag));
|
||||
UIObjectFactory.SetPackageItemExtension(HomeMainPage.URL, typeof(HomeMainPage));
|
||||
|
||||
29
Assets/Scripts/UI/Settings/KeyboardInput.Designer.cs
generated
Normal file
29
Assets/Scripts/UI/Settings/KeyboardInput.Designer.cs
generated
Normal file
@@ -0,0 +1,29 @@
|
||||
/**本脚本为自动生成,每次生成会覆盖!请勿手动修改,生成插件文档及项目地址:https://git.whoot.com/whoot-games/whoot.fguieditorplugin**/
|
||||
|
||||
|
||||
using FairyGUI;
|
||||
using FairyGUI.Utils;
|
||||
using NBC;
|
||||
|
||||
namespace NBF
|
||||
{
|
||||
public partial class KeyboardInput
|
||||
{
|
||||
public const string URL = "ui://hxr7rc7p5dtx1b";
|
||||
|
||||
public Controller state;
|
||||
public GImage bottomLine;
|
||||
public GTextField TextKeyboard;
|
||||
|
||||
public override void ConstructFromXML(XML xml)
|
||||
{
|
||||
base.ConstructFromXML(xml);
|
||||
|
||||
state = GetController("state");
|
||||
bottomLine = (GImage)GetChild("bottomLine");
|
||||
TextKeyboard = (GTextField)GetChild("TextKeyboard");
|
||||
OnInited();
|
||||
UILanguage.TrySetComponentLanguage(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0ddb059fe879d5c4abe82933558551a2
|
||||
27
Assets/Scripts/UI/Settings/KeyboardInput.cs
Normal file
27
Assets/Scripts/UI/Settings/KeyboardInput.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
// 本脚本只在不存在时会生成一次。组件逻辑写在当前脚本内。已存在不会再次生成覆盖
|
||||
|
||||
using UnityEngine;
|
||||
using FairyGUI;
|
||||
using NBC;
|
||||
using NBF.Setting;
|
||||
using UnityEngine.InputSystem;
|
||||
|
||||
namespace NBF
|
||||
{
|
||||
public partial class KeyboardInput : GButton
|
||||
{
|
||||
private void OnInited()
|
||||
{
|
||||
}
|
||||
|
||||
public void SetData(InputOption option)
|
||||
{
|
||||
TextKeyboard.visible = false;
|
||||
if (option is KeyBoardOption)
|
||||
{
|
||||
TextKeyboard.visible = true;
|
||||
TextKeyboard.text = option.GetDisplayString();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
2
Assets/Scripts/UI/Settings/KeyboardInput.cs.meta
Normal file
2
Assets/Scripts/UI/Settings/KeyboardInput.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2ed06aa0989ac484689d7c696bcf8246
|
||||
29
Assets/Scripts/UI/Settings/SettingInputItem.Designer.cs
generated
Normal file
29
Assets/Scripts/UI/Settings/SettingInputItem.Designer.cs
generated
Normal file
@@ -0,0 +1,29 @@
|
||||
/**本脚本为自动生成,每次生成会覆盖!请勿手动修改,生成插件文档及项目地址:https://git.whoot.com/whoot-games/whoot.fguieditorplugin**/
|
||||
|
||||
|
||||
using FairyGUI;
|
||||
using FairyGUI.Utils;
|
||||
using NBC;
|
||||
|
||||
namespace NBF
|
||||
{
|
||||
public partial class SettingInputItem
|
||||
{
|
||||
public const string URL = "ui://hxr7rc7p5dtx1c";
|
||||
|
||||
public GImage back;
|
||||
public GTextField TextName;
|
||||
public KeyboardInput BtnKeyboard;
|
||||
|
||||
public override void ConstructFromXML(XML xml)
|
||||
{
|
||||
base.ConstructFromXML(xml);
|
||||
|
||||
back = (GImage)GetChild("back");
|
||||
TextName = (GTextField)GetChild("TextName");
|
||||
BtnKeyboard = (KeyboardInput)GetChild("BtnKeyboard");
|
||||
OnInited();
|
||||
UILanguage.TrySetComponentLanguage(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a3336f2973a5dd242a9fed2120d8b75b
|
||||
36
Assets/Scripts/UI/Settings/SettingInputItem.cs
Normal file
36
Assets/Scripts/UI/Settings/SettingInputItem.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
// 本脚本只在不存在时会生成一次。组件逻辑写在当前脚本内。已存在不会再次生成覆盖
|
||||
|
||||
using System.Globalization;
|
||||
using UnityEngine;
|
||||
using FairyGUI;
|
||||
using NBC;
|
||||
using NBF.Setting;
|
||||
|
||||
namespace NBF
|
||||
{
|
||||
public partial class SettingInputItem : GButton
|
||||
{
|
||||
public OptionBase Option;
|
||||
|
||||
private void OnInited()
|
||||
{
|
||||
}
|
||||
|
||||
public void SetData(OptionBase option)
|
||||
{
|
||||
Option = option;
|
||||
TextName.SetLanguage(Option.Name);
|
||||
SetShow();
|
||||
}
|
||||
|
||||
private void SetShow()
|
||||
{
|
||||
UpdateValueText();
|
||||
}
|
||||
|
||||
private void UpdateValueText()
|
||||
{
|
||||
BtnKeyboard.SetData(Option as InputOption);
|
||||
}
|
||||
}
|
||||
}
|
||||
2
Assets/Scripts/UI/Settings/SettingInputItem.cs.meta
Normal file
2
Assets/Scripts/UI/Settings/SettingInputItem.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fd7a19031ef9b1143997dca07c932a46
|
||||
@@ -33,6 +33,10 @@ namespace NBF
|
||||
Slider.max = range.MaxValue;
|
||||
Slider.wholeNumbers = true;
|
||||
}
|
||||
else if (option is KeyBoardOption keyBoardOption)
|
||||
{
|
||||
style.selectedIndex = 2;
|
||||
}
|
||||
|
||||
TextName.SetLanguage(Option.Name);
|
||||
SetShow();
|
||||
|
||||
@@ -64,7 +64,7 @@ namespace NBF
|
||||
{
|
||||
// TextTitle.text = Lan.Get(_currentGroup);
|
||||
_nowSelectIndex = -1;
|
||||
List.RemoveChildrenToPool();
|
||||
|
||||
if (string.IsNullOrEmpty(_currentTab)) return;
|
||||
var options = Settings.Instance.GetOptionsByTab(_currentTab);
|
||||
Dictionary<string, List<OptionBase>> groupOptions = new Dictionary<string, List<OptionBase>>();
|
||||
@@ -80,6 +80,10 @@ namespace NBF
|
||||
}
|
||||
|
||||
_canSelectIndex.Clear();
|
||||
|
||||
List.RemoveChildrenToPool();
|
||||
|
||||
|
||||
var url = UIPackage.GetItemURL(UIPackName, "SettingSubTitleItem");
|
||||
foreach (var key in groupOptions.Keys)
|
||||
{
|
||||
@@ -91,11 +95,23 @@ namespace NBF
|
||||
|
||||
foreach (var option in value)
|
||||
{
|
||||
if (List.AddItemFromPool() is SettingItem item)
|
||||
if (option is InputOption)
|
||||
{
|
||||
item.SetData(option);
|
||||
var index = List.GetChildIndex(item);
|
||||
_canSelectIndex.Add(index);
|
||||
if (List.AddItemFromPool(SettingInputItem.URL) is SettingInputItem item)
|
||||
{
|
||||
item.SetData(option);
|
||||
var index = List.GetChildIndex(item);
|
||||
_canSelectIndex.Add(index);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (List.AddItemFromPool() is SettingItem item)
|
||||
{
|
||||
item.SetData(option);
|
||||
var index = List.GetChildIndex(item);
|
||||
_canSelectIndex.Add(index);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1,7 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6e59c59b81ab47f9b6ec5781fa725d2c
|
||||
timeCreated: 1484171296
|
||||
licenseType: Store
|
||||
licenseType: Pro
|
||||
TextScriptImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e3265ab4bf004d28a9537516768c1c75
|
||||
timeCreated: 1484171297
|
||||
licenseType: Store
|
||||
licenseType: Pro
|
||||
TrueTypeFontImporter:
|
||||
serializedVersion: 2
|
||||
fontSize: 16
|
||||
|
||||
@@ -2,7 +2,7 @@ fileFormatVersion: 2
|
||||
guid: 731f1baa9d144a9897cb1d341c2092b8
|
||||
folderAsset: yes
|
||||
timeCreated: 1442040525
|
||||
licenseType: Store
|
||||
licenseType: Pro
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e73a58f6e2794ae7b1b7e50b7fb811b0
|
||||
timeCreated: 1484172806
|
||||
licenseType: Store
|
||||
licenseType: Pro
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
|
||||
@@ -160,20 +160,19 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 71c1514a6bd24e1e882cebbe1904ce04, type: 3}
|
||||
m_Name: LiberationSans SDF - Fallback
|
||||
m_EditorClassIdentifier:
|
||||
hashCode: -1699145518
|
||||
material: {fileID: 2180264}
|
||||
materialHashCode: 462855346
|
||||
m_Version: 1.1.0
|
||||
m_Material: {fileID: 2180264}
|
||||
m_SourceFontFileGUID: e3265ab4bf004d28a9537516768c1c75
|
||||
m_SourceFontFile_EditorRef: {fileID: 12800000, guid: e3265ab4bf004d28a9537516768c1c75,
|
||||
type: 3}
|
||||
m_SourceFontFile: {fileID: 12800000, guid: e3265ab4bf004d28a9537516768c1c75, type: 3}
|
||||
m_AtlasPopulationMode: 1
|
||||
InternalDynamicOS: 0
|
||||
m_FaceInfo:
|
||||
m_FaceIndex: 0
|
||||
m_FamilyName: Liberation Sans
|
||||
m_StyleName: Regular
|
||||
m_PointSize: 86
|
||||
m_Scale: 1
|
||||
m_UnitsPerEM: 2048
|
||||
m_LineHeight: 98.8916
|
||||
m_AscentLine: 77.853516
|
||||
m_CapLine: 59
|
||||
@@ -194,7 +193,7 @@ MonoBehaviour:
|
||||
m_AtlasTextures:
|
||||
- {fileID: 28268798066460806}
|
||||
m_AtlasTextureIndex: 0
|
||||
m_IsMultiAtlasTexturesEnabled: 0
|
||||
m_IsMultiAtlasTexturesEnabled: 1
|
||||
m_ClearDynamicDataOnBuild: 1
|
||||
m_UsedGlyphRects: []
|
||||
m_FreeGlyphRects:
|
||||
@@ -233,15 +232,21 @@ MonoBehaviour:
|
||||
m_KerningTable:
|
||||
kerningPairs: []
|
||||
m_FontFeatureTable:
|
||||
m_MultipleSubstitutionRecords: []
|
||||
m_LigatureSubstitutionRecords: []
|
||||
m_GlyphPairAdjustmentRecords: []
|
||||
m_MarkToBaseAdjustmentRecords: []
|
||||
m_MarkToMarkAdjustmentRecords: []
|
||||
fallbackFontAssets: []
|
||||
m_FallbackFontAssetTable: []
|
||||
m_CreationSettings:
|
||||
sourceFontFileName:
|
||||
sourceFontFileGUID: e3265ab4bf004d28a9537516768c1c75
|
||||
faceIndex: 0
|
||||
pointSizeSamplingMode: 0
|
||||
pointSize: 86
|
||||
padding: 9
|
||||
paddingMode: 0
|
||||
packingMode: 4
|
||||
atlasWidth: 512
|
||||
atlasHeight: 512
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2e498d1c8094910479dc3e1b768306a4
|
||||
timeCreated: 1484171803
|
||||
licenseType: Store
|
||||
licenseType: Pro
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 79459efec17a4d00a321bdcc27bbc385
|
||||
timeCreated: 1484172856
|
||||
licenseType: Store
|
||||
licenseType: Pro
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8f586378b4e144a9851e7b34d9b748ee
|
||||
timeCreated: 1484171803
|
||||
licenseType: Store
|
||||
licenseType: Pro
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
|
||||
@@ -2,7 +2,7 @@ fileFormatVersion: 2
|
||||
guid: 512a49d95c0c4332bdd98131869c23c9
|
||||
folderAsset: yes
|
||||
timeCreated: 1441876896
|
||||
licenseType: Store
|
||||
licenseType: Pro
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c41005c129ba4d66911b75229fd70b45
|
||||
timeCreated: 1480316912
|
||||
licenseType: Store
|
||||
licenseType: Pro
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
|
||||
@@ -2,7 +2,7 @@ fileFormatVersion: 2
|
||||
guid: 4aecb92fff08436c8303b10eab8da368
|
||||
folderAsset: yes
|
||||
timeCreated: 1441876950
|
||||
licenseType: Store
|
||||
licenseType: Pro
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
|
||||
@@ -3,8 +3,9 @@
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
@@ -12,6 +13,12 @@ MonoBehaviour:
|
||||
m_Name: Default Style Sheet
|
||||
m_EditorClassIdentifier:
|
||||
m_StyleList:
|
||||
- m_Name: Normal
|
||||
m_HashCode: -1183493901
|
||||
m_OpeningDefinition:
|
||||
m_ClosingDefinition:
|
||||
m_OpeningTagArray:
|
||||
m_ClosingTagArray:
|
||||
- m_Name: H1
|
||||
m_HashCode: 2425
|
||||
m_OpeningDefinition: <size=2em><b><#40ff80>*
|
||||
@@ -19,19 +26,25 @@ MonoBehaviour:
|
||||
m_OpeningTagArray: 3c00000073000000690000007a000000650000003d00000032000000650000006d0000003e0000003c000000620000003e0000003c000000230000003400000030000000660000006600000038000000300000003e0000002a000000
|
||||
m_ClosingTagArray: 2a0000003c0000002f00000073000000690000007a000000650000003e0000003c0000002f000000620000003e0000003c0000002f000000630000006f0000006c0000006f000000720000003e000000
|
||||
- m_Name: Quote
|
||||
m_HashCode: 92254330
|
||||
m_HashCode: 93368250
|
||||
m_OpeningDefinition: <i><size=75%><margin=10%>
|
||||
m_ClosingDefinition: </i></size></width></margin>
|
||||
m_OpeningTagArray: 3c000000690000003e0000003c00000073000000690000007a000000650000003d0000003700000035000000250000003e0000003c0000006d000000610000007200000067000000690000006e0000003d0000003100000030000000250000003e000000
|
||||
m_ClosingTagArray: 3c0000002f000000690000003e0000003c0000002f00000073000000690000007a000000650000003e0000003c0000002f00000077000000690000006400000074000000680000003e0000003c0000002f0000006d000000610000007200000067000000690000006e0000003e000000
|
||||
- m_Name: A
|
||||
m_HashCode: 65
|
||||
m_OpeningDefinition: <color=#40a0ff><u>
|
||||
m_ClosingDefinition: </u></color>
|
||||
m_OpeningTagArray: 3c000000630000006f0000006c0000006f000000720000003d000000230000003400000030000000610000003000000066000000660000003e0000003c000000750000003e000000
|
||||
m_ClosingTagArray: 3c0000002f000000750000003e0000003c0000002f000000630000006f0000006c0000006f000000720000003e000000
|
||||
- m_Name: Link
|
||||
m_HashCode: 2687968
|
||||
m_HashCode: 2656128
|
||||
m_OpeningDefinition: <u><#40a0ff><link="ID_01">
|
||||
m_ClosingDefinition: </u></color></link>
|
||||
m_OpeningTagArray: 3c000000750000003e0000003c000000230000003400000030000000610000003000000066000000660000003e0000003c0000006c000000690000006e0000006b0000003d0000002200000049000000440000005f0000003000000031000000220000003e000000
|
||||
m_ClosingTagArray: 3c0000002f000000750000003e0000003c0000002f000000630000006f0000006c0000006f000000720000003e0000003c0000002f0000006c000000690000006e0000006b0000003e000000
|
||||
- m_Name: Title
|
||||
m_HashCode: 98732960
|
||||
m_HashCode: 97690656
|
||||
m_OpeningDefinition: <size=125%><b><align=center>
|
||||
m_ClosingDefinition: </size></b></align>
|
||||
m_OpeningTagArray: 3c00000073000000690000007a000000650000003d000000310000003200000035000000250000003e0000003c000000620000003e0000003c000000610000006c00000069000000670000006e0000003d00000063000000650000006e0000007400000065000000720000003e000000
|
||||
|
||||
@@ -12,14 +12,17 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 2705215ac5b84b70bacc50632be6e391, type: 3}
|
||||
m_Name: TMP Settings
|
||||
m_EditorClassIdentifier:
|
||||
m_enableWordWrapping: 1
|
||||
assetVersion: 2
|
||||
m_TextWrappingMode: 1
|
||||
m_enableKerning: 1
|
||||
m_ActiveFontFeatures: 00000000
|
||||
m_enableExtraPadding: 0
|
||||
m_enableTintAllSprites: 0
|
||||
m_enableParseEscapeCharacters: 1
|
||||
m_EnableRaycastTarget: 1
|
||||
m_GetFontFeaturesAtRuntime: 1
|
||||
m_missingGlyphCharacter: 0
|
||||
m_ClearDynamicDataOnBuild: 1
|
||||
m_warningsDisabled: 0
|
||||
m_defaultFontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
|
||||
m_defaultFontAssetPath: Fonts & Materials/
|
||||
@@ -29,18 +32,18 @@ MonoBehaviour:
|
||||
m_defaultTextMeshProTextContainerSize: {x: 20, y: 5}
|
||||
m_defaultTextMeshProUITextContainerSize: {x: 200, y: 50}
|
||||
m_autoSizeTextContainer: 0
|
||||
m_IsTextObjectScaleStatic: 0
|
||||
m_fallbackFontAssets: []
|
||||
m_matchMaterialPreset: 1
|
||||
m_defaultSpriteAsset: {fileID: 11400000, guid: c41005c129ba4d66911b75229fd70b45,
|
||||
type: 2}
|
||||
m_HideSubTextObjects: 1
|
||||
m_defaultSpriteAsset: {fileID: 11400000, guid: c41005c129ba4d66911b75229fd70b45, type: 2}
|
||||
m_defaultSpriteAssetPath: Sprite Assets/
|
||||
m_enableEmojiSupport: 1
|
||||
m_MissingCharacterSpriteUnicode: 0
|
||||
m_EmojiFallbackTextAssets: []
|
||||
m_defaultColorGradientPresetsPath: Color Gradient Presets/
|
||||
m_defaultStyleSheet: {fileID: 11400000, guid: f952c082cb03451daed3ee968ac6c63e,
|
||||
type: 2}
|
||||
m_defaultStyleSheet: {fileID: 11400000, guid: f952c082cb03451daed3ee968ac6c63e, type: 2}
|
||||
m_StyleSheetsResourcePath:
|
||||
m_leadingCharacters: {fileID: 4900000, guid: d82c1b31c7e74239bff1220585707d2b, type: 3}
|
||||
m_followingCharacters: {fileID: 4900000, guid: fade42e8bc714b018fac513c043d323b,
|
||||
type: 3}
|
||||
m_followingCharacters: {fileID: 4900000, guid: fade42e8bc714b018fac513c043d323b, type: 3}
|
||||
m_UseModernHangulLineBreakingRules: 0
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3f5b5dff67a942289a9defa416b206f3
|
||||
timeCreated: 1436653997
|
||||
licenseType: Store
|
||||
licenseType: Pro
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
|
||||
@@ -1,26 +1,26 @@
|
||||
Shader "TextMeshPro/Bitmap Custom Atlas" {
|
||||
|
||||
Properties {
|
||||
_MainTex ("Font Atlas", 2D) = "white" {}
|
||||
_FaceTex ("Font Texture", 2D) = "white" {}
|
||||
[HDR]_FaceColor ("Text Color", Color) = (1,1,1,1)
|
||||
_MainTex ("Font Atlas", 2D) = "white" {}
|
||||
_FaceTex ("Font Texture", 2D) = "white" {}
|
||||
_FaceColor ("Text Color", Color) = (1,1,1,1)
|
||||
|
||||
_VertexOffsetX ("Vertex OffsetX", float) = 0
|
||||
_VertexOffsetY ("Vertex OffsetY", float) = 0
|
||||
_MaskSoftnessX ("Mask SoftnessX", float) = 0
|
||||
_MaskSoftnessY ("Mask SoftnessY", float) = 0
|
||||
_VertexOffsetX ("Vertex OffsetX", float) = 0
|
||||
_VertexOffsetY ("Vertex OffsetY", float) = 0
|
||||
_MaskSoftnessX ("Mask SoftnessX", float) = 0
|
||||
_MaskSoftnessY ("Mask SoftnessY", float) = 0
|
||||
|
||||
_ClipRect("Clip Rect", vector) = (-32767, -32767, 32767, 32767)
|
||||
_Padding ("Padding", float) = 0
|
||||
_ClipRect ("Clip Rect", vector) = (-32767, -32767, 32767, 32767)
|
||||
_Padding ("Padding", float) = 0
|
||||
|
||||
_StencilComp("Stencil Comparison", Float) = 8
|
||||
_Stencil("Stencil ID", Float) = 0
|
||||
_StencilOp("Stencil Operation", Float) = 0
|
||||
_StencilWriteMask("Stencil Write Mask", Float) = 255
|
||||
_StencilReadMask("Stencil Read Mask", Float) = 255
|
||||
_StencilComp ("Stencil Comparison", Float) = 8
|
||||
_Stencil ("Stencil ID", Float) = 0
|
||||
_StencilOp ("Stencil Operation", Float) = 0
|
||||
_StencilWriteMask ("Stencil Write Mask", Float) = 255
|
||||
_StencilReadMask ("Stencil Read Mask", Float) = 255
|
||||
|
||||
_CullMode("Cull Mode", Float) = 0
|
||||
_ColorMask("Color Mask", Float) = 15
|
||||
_CullMode ("Cull Mode", Float) = 0
|
||||
_ColorMask ("Color Mask", Float) = 15
|
||||
}
|
||||
|
||||
SubShader{
|
||||
@@ -55,15 +55,18 @@ SubShader{
|
||||
|
||||
|
||||
#include "UnityCG.cginc"
|
||||
#include "UnityUI.cginc"
|
||||
|
||||
struct appdata_t {
|
||||
struct appdata_t
|
||||
{
|
||||
float4 vertex : POSITION;
|
||||
fixed4 color : COLOR;
|
||||
float2 texcoord0 : TEXCOORD0;
|
||||
float4 texcoord0 : TEXCOORD0;
|
||||
float2 texcoord1 : TEXCOORD1;
|
||||
};
|
||||
|
||||
struct v2f {
|
||||
struct v2f
|
||||
{
|
||||
float4 vertex : SV_POSITION;
|
||||
fixed4 color : COLOR;
|
||||
float2 texcoord0 : TEXCOORD0;
|
||||
@@ -81,15 +84,9 @@ SubShader{
|
||||
uniform float4 _ClipRect;
|
||||
uniform float _MaskSoftnessX;
|
||||
uniform float _MaskSoftnessY;
|
||||
|
||||
float2 UnpackUV(float uv)
|
||||
{
|
||||
float2 output;
|
||||
output.x = floor(uv / 4096);
|
||||
output.y = uv - 4096 * output.x;
|
||||
|
||||
return output * 0.001953125;
|
||||
}
|
||||
uniform float _UIMaskSoftnessX;
|
||||
uniform float _UIMaskSoftnessY;
|
||||
uniform int _UIVertexColorAlwaysGammaSpace;
|
||||
|
||||
v2f vert (appdata_t v)
|
||||
{
|
||||
@@ -101,6 +98,10 @@ SubShader{
|
||||
|
||||
float4 vPosition = UnityPixelSnap(UnityObjectToClipPos(vert));
|
||||
|
||||
if (_UIVertexColorAlwaysGammaSpace && !IsGammaSpace())
|
||||
{
|
||||
v.color.rgb = UIGammaToLinear(v.color.rgb);
|
||||
}
|
||||
fixed4 faceColor = v.color;
|
||||
faceColor *= _FaceColor;
|
||||
|
||||
@@ -108,13 +109,14 @@ SubShader{
|
||||
OUT.vertex = vPosition;
|
||||
OUT.color = faceColor;
|
||||
OUT.texcoord0 = v.texcoord0;
|
||||
OUT.texcoord1 = TRANSFORM_TEX(UnpackUV(v.texcoord1), _FaceTex);
|
||||
OUT.texcoord1 = TRANSFORM_TEX(v.texcoord1, _FaceTex);
|
||||
float2 pixelSize = vPosition.w;
|
||||
pixelSize /= abs(float2(_ScreenParams.x * UNITY_MATRIX_P[0][0], _ScreenParams.y * UNITY_MATRIX_P[1][1]));
|
||||
|
||||
// Clamp _ClipRect to 16bit.
|
||||
float4 clampedRect = clamp(_ClipRect, -2e10, 2e10);
|
||||
OUT.mask = float4(vert.xy * 2 - clampedRect.xy - clampedRect.zw, 0.25 / (0.25 * half2(_MaskSoftnessX, _MaskSoftnessY) + pixelSize.xy));
|
||||
const float4 clampedRect = clamp(_ClipRect, -2e10, 2e10);
|
||||
const half2 maskSoftness = half2(max(_UIMaskSoftnessX, _MaskSoftnessX), max(_UIMaskSoftnessY, _MaskSoftnessY));
|
||||
OUT.mask = float4(vert.xy * 2 - clampedRect.xy - clampedRect.zw, 0.25 / (0.25 * maskSoftness + pixelSize.xy));
|
||||
|
||||
return OUT;
|
||||
}
|
||||
|
||||
@@ -1,25 +1,25 @@
|
||||
Shader "TextMeshPro/Mobile/Bitmap" {
|
||||
|
||||
Properties {
|
||||
_MainTex ("Font Atlas", 2D) = "white" {}
|
||||
[HDR]_Color ("Text Color", Color) = (1,1,1,1)
|
||||
_DiffusePower ("Diffuse Power", Range(1.0,4.0)) = 1.0
|
||||
_MainTex ("Font Atlas", 2D) = "white" {}
|
||||
_Color ("Text Color", Color) = (1,1,1,1)
|
||||
_DiffusePower ("Diffuse Power", Range(1.0,4.0)) = 1.0
|
||||
|
||||
_VertexOffsetX("Vertex OffsetX", float) = 0
|
||||
_VertexOffsetY("Vertex OffsetY", float) = 0
|
||||
_MaskSoftnessX("Mask SoftnessX", float) = 0
|
||||
_MaskSoftnessY("Mask SoftnessY", float) = 0
|
||||
_VertexOffsetX ("Vertex OffsetX", float) = 0
|
||||
_VertexOffsetY ("Vertex OffsetY", float) = 0
|
||||
_MaskSoftnessX ("Mask SoftnessX", float) = 0
|
||||
_MaskSoftnessY ("Mask SoftnessY", float) = 0
|
||||
|
||||
_ClipRect("Clip Rect", vector) = (-32767, -32767, 32767, 32767)
|
||||
_ClipRect ("Clip Rect", vector) = (-32767, -32767, 32767, 32767)
|
||||
|
||||
_StencilComp("Stencil Comparison", Float) = 8
|
||||
_Stencil("Stencil ID", Float) = 0
|
||||
_StencilOp("Stencil Operation", Float) = 0
|
||||
_StencilWriteMask("Stencil Write Mask", Float) = 255
|
||||
_StencilReadMask("Stencil Read Mask", Float) = 255
|
||||
_StencilComp ("Stencil Comparison", Float) = 8
|
||||
_Stencil ("Stencil ID", Float) = 0
|
||||
_StencilOp ("Stencil Operation", Float) = 0
|
||||
_StencilWriteMask ("Stencil Write Mask", Float) = 255
|
||||
_StencilReadMask ("Stencil Read Mask", Float) = 255
|
||||
|
||||
_CullMode("Cull Mode", Float) = 0
|
||||
_ColorMask("Color Mask", Float) = 15
|
||||
_CullMode ("Cull Mode", Float) = 0
|
||||
_ColorMask ("Color Mask", Float) = 15
|
||||
}
|
||||
|
||||
SubShader {
|
||||
@@ -55,15 +55,18 @@ SubShader {
|
||||
|
||||
|
||||
#include "UnityCG.cginc"
|
||||
#include "UnityUI.cginc"
|
||||
|
||||
struct appdata_t {
|
||||
struct appdata_t
|
||||
{
|
||||
float4 vertex : POSITION;
|
||||
fixed4 color : COLOR;
|
||||
float2 texcoord0 : TEXCOORD0;
|
||||
float2 texcoord1 : TEXCOORD1;
|
||||
};
|
||||
|
||||
struct v2f {
|
||||
struct v2f
|
||||
{
|
||||
float4 vertex : POSITION;
|
||||
fixed4 color : COLOR;
|
||||
float2 texcoord0 : TEXCOORD0;
|
||||
@@ -79,6 +82,9 @@ SubShader {
|
||||
uniform float4 _ClipRect;
|
||||
uniform float _MaskSoftnessX;
|
||||
uniform float _MaskSoftnessY;
|
||||
uniform float _UIMaskSoftnessX;
|
||||
uniform float _UIMaskSoftnessY;
|
||||
uniform int _UIVertexColorAlwaysGammaSpace;
|
||||
|
||||
v2f vert (appdata_t v)
|
||||
{
|
||||
@@ -88,8 +94,11 @@ SubShader {
|
||||
vert.y += _VertexOffsetY;
|
||||
|
||||
vert.xy += (vert.w * 0.5) / _ScreenParams.xy;
|
||||
|
||||
OUT.vertex = UnityPixelSnap(UnityObjectToClipPos(vert));
|
||||
if (_UIVertexColorAlwaysGammaSpace && !IsGammaSpace())
|
||||
{
|
||||
v.color.rgb = UIGammaToLinear(v.color.rgb);
|
||||
}
|
||||
OUT.vertex = UnityPixelSnap(UnityObjectToClipPos(vert));
|
||||
OUT.color = v.color;
|
||||
OUT.color *= _Color;
|
||||
OUT.color.rgb *= _DiffusePower;
|
||||
@@ -99,8 +108,9 @@ SubShader {
|
||||
//pixelSize /= abs(float2(_ScreenParams.x * UNITY_MATRIX_P[0][0], _ScreenParams.y * UNITY_MATRIX_P[1][1]));
|
||||
|
||||
// Clamp _ClipRect to 16bit.
|
||||
float4 clampedRect = clamp(_ClipRect, -2e10, 2e10);
|
||||
OUT.mask = float4(vert.xy * 2 - clampedRect.xy - clampedRect.zw, 0.25 / (0.25 * half2(_MaskSoftnessX, _MaskSoftnessY) + pixelSize.xy));
|
||||
const float4 clampedRect = clamp(_ClipRect, -2e10, 2e10);
|
||||
const half2 maskSoftness = half2(max(_UIMaskSoftnessX, _MaskSoftnessX), max(_UIMaskSoftnessY, _MaskSoftnessY));
|
||||
OUT.mask = float4(vert.xy * 2 - clampedRect.xy - clampedRect.zw, 0.25 / (0.25 * maskSoftness + pixelSize.xy));
|
||||
|
||||
return OUT;
|
||||
}
|
||||
|
||||
@@ -1,25 +1,25 @@
|
||||
Shader "TextMeshPro/Bitmap" {
|
||||
|
||||
Properties {
|
||||
_MainTex ("Font Atlas", 2D) = "white" {}
|
||||
_FaceTex ("Font Texture", 2D) = "white" {}
|
||||
[HDR]_FaceColor ("Text Color", Color) = (1,1,1,1)
|
||||
_MainTex ("Font Atlas", 2D) = "white" {}
|
||||
_FaceTex ("Font Texture", 2D) = "white" {}
|
||||
_FaceColor ("Text Color", Color) = (1,1,1,1)
|
||||
|
||||
_VertexOffsetX ("Vertex OffsetX", float) = 0
|
||||
_VertexOffsetY ("Vertex OffsetY", float) = 0
|
||||
_MaskSoftnessX ("Mask SoftnessX", float) = 0
|
||||
_MaskSoftnessY ("Mask SoftnessY", float) = 0
|
||||
_VertexOffsetX ("Vertex OffsetX", float) = 0
|
||||
_VertexOffsetY ("Vertex OffsetY", float) = 0
|
||||
_MaskSoftnessX ("Mask SoftnessX", float) = 0
|
||||
_MaskSoftnessY ("Mask SoftnessY", float) = 0
|
||||
|
||||
_ClipRect("Clip Rect", vector) = (-32767, -32767, 32767, 32767)
|
||||
_ClipRect ("Clip Rect", vector) = (-32767, -32767, 32767, 32767)
|
||||
|
||||
_StencilComp("Stencil Comparison", Float) = 8
|
||||
_Stencil("Stencil ID", Float) = 0
|
||||
_StencilOp("Stencil Operation", Float) = 0
|
||||
_StencilWriteMask("Stencil Write Mask", Float) = 255
|
||||
_StencilReadMask("Stencil Read Mask", Float) = 255
|
||||
_StencilComp ("Stencil Comparison", Float) = 8
|
||||
_Stencil ("Stencil ID", Float) = 0
|
||||
_StencilOp ("Stencil Operation", Float) = 0
|
||||
_StencilWriteMask ("Stencil Write Mask", Float) = 255
|
||||
_StencilReadMask ("Stencil Read Mask", Float) = 255
|
||||
|
||||
_CullMode("Cull Mode", Float) = 0
|
||||
_ColorMask("Color Mask", Float) = 15
|
||||
_CullMode ("Cull Mode", Float) = 0
|
||||
_ColorMask ("Color Mask", Float) = 15
|
||||
}
|
||||
|
||||
SubShader{
|
||||
@@ -54,15 +54,18 @@ SubShader{
|
||||
|
||||
|
||||
#include "UnityCG.cginc"
|
||||
#include "UnityUI.cginc"
|
||||
|
||||
struct appdata_t {
|
||||
struct appdata_t
|
||||
{
|
||||
float4 vertex : POSITION;
|
||||
fixed4 color : COLOR;
|
||||
float2 texcoord0 : TEXCOORD0;
|
||||
float4 texcoord0 : TEXCOORD0;
|
||||
float2 texcoord1 : TEXCOORD1;
|
||||
};
|
||||
|
||||
struct v2f {
|
||||
struct v2f
|
||||
{
|
||||
float4 vertex : SV_POSITION;
|
||||
fixed4 color : COLOR;
|
||||
float2 texcoord0 : TEXCOORD0;
|
||||
@@ -80,15 +83,9 @@ SubShader{
|
||||
uniform float4 _ClipRect;
|
||||
uniform float _MaskSoftnessX;
|
||||
uniform float _MaskSoftnessY;
|
||||
|
||||
float2 UnpackUV(float uv)
|
||||
{
|
||||
float2 output;
|
||||
output.x = floor(uv / 4096);
|
||||
output.y = uv - 4096 * output.x;
|
||||
|
||||
return output * 0.001953125;
|
||||
}
|
||||
uniform float _UIMaskSoftnessX;
|
||||
uniform float _UIMaskSoftnessY;
|
||||
uniform int _UIVertexColorAlwaysGammaSpace;
|
||||
|
||||
v2f vert (appdata_t v)
|
||||
{
|
||||
@@ -100,6 +97,10 @@ SubShader{
|
||||
|
||||
float4 vPosition = UnityPixelSnap(UnityObjectToClipPos(vert));
|
||||
|
||||
if (_UIVertexColorAlwaysGammaSpace && !IsGammaSpace())
|
||||
{
|
||||
v.color.rgb = UIGammaToLinear(v.color.rgb);
|
||||
}
|
||||
fixed4 faceColor = v.color;
|
||||
faceColor *= _FaceColor;
|
||||
|
||||
@@ -107,13 +108,14 @@ SubShader{
|
||||
OUT.vertex = vPosition;
|
||||
OUT.color = faceColor;
|
||||
OUT.texcoord0 = v.texcoord0;
|
||||
OUT.texcoord1 = TRANSFORM_TEX(UnpackUV(v.texcoord1), _FaceTex);
|
||||
OUT.texcoord1 = TRANSFORM_TEX(v.texcoord1, _FaceTex);
|
||||
float2 pixelSize = vPosition.w;
|
||||
pixelSize /= abs(float2(_ScreenParams.x * UNITY_MATRIX_P[0][0], _ScreenParams.y * UNITY_MATRIX_P[1][1]));
|
||||
|
||||
// Clamp _ClipRect to 16bit.
|
||||
float4 clampedRect = clamp(_ClipRect, -2e10, 2e10);
|
||||
OUT.mask = float4(vert.xy * 2 - clampedRect.xy - clampedRect.zw, 0.25 / (0.25 * half2(_MaskSoftnessX, _MaskSoftnessY) + pixelSize.xy));
|
||||
const float4 clampedRect = clamp(_ClipRect, -2e10, 2e10);
|
||||
const half2 maskSoftness = half2(max(_UIMaskSoftnessX, _MaskSoftnessX), max(_UIMaskSoftnessY, _MaskSoftnessY));
|
||||
OUT.mask = float4(vert.xy * 2 - clampedRect.xy - clampedRect.zw, 0.25 / (0.25 * maskSoftness + pixelSize.xy));
|
||||
|
||||
return OUT;
|
||||
}
|
||||
|
||||
@@ -4,10 +4,10 @@ Properties {
|
||||
_FaceTex ("Face Texture", 2D) = "white" {}
|
||||
_FaceUVSpeedX ("Face UV Speed X", Range(-5, 5)) = 0.0
|
||||
_FaceUVSpeedY ("Face UV Speed Y", Range(-5, 5)) = 0.0
|
||||
[HDR]_FaceColor ("Face Color", Color) = (1,1,1,1)
|
||||
_FaceColor ("Face Color", Color) = (1,1,1,1)
|
||||
_FaceDilate ("Face Dilate", Range(-1,1)) = 0
|
||||
|
||||
[HDR]_OutlineColor ("Outline Color", Color) = (0,0,0,1)
|
||||
_OutlineColor ("Outline Color", Color) = (0,0,0,1)
|
||||
_OutlineTex ("Outline Texture", 2D) = "white" {}
|
||||
_OutlineUVSpeedX ("Outline UV Speed X", Range(-5, 5)) = 0.0
|
||||
_OutlineUVSpeedY ("Outline UV Speed Y", Range(-5, 5)) = 0.0
|
||||
@@ -21,7 +21,7 @@ Properties {
|
||||
_BevelRoundness ("Bevel Roundness", Range(0,1)) = 0
|
||||
|
||||
_LightAngle ("Light Angle", Range(0.0, 6.2831853)) = 3.1416
|
||||
[HDR]_SpecularColor ("Specular", Color) = (1,1,1,1)
|
||||
_SpecularColor ("Specular", Color) = (1,1,1,1)
|
||||
_SpecularPower ("Specular", Range(0,4)) = 2.0
|
||||
_Reflectivity ("Reflectivity", Range(5.0,15.0)) = 10
|
||||
_Diffuse ("Diffuse", Range(0,1)) = 0.5
|
||||
@@ -37,13 +37,13 @@ Properties {
|
||||
_EnvMatrixRotation ("Texture Rotation", vector) = (0, 0, 0, 0)
|
||||
|
||||
|
||||
[HDR]_UnderlayColor ("Border Color", Color) = (0,0,0, 0.5)
|
||||
_UnderlayColor ("Border Color", Color) = (0,0,0, 0.5)
|
||||
_UnderlayOffsetX ("Border OffsetX", Range(-1,1)) = 0
|
||||
_UnderlayOffsetY ("Border OffsetY", Range(-1,1)) = 0
|
||||
_UnderlayDilate ("Border Dilate", Range(-1,1)) = 0
|
||||
_UnderlaySoftness ("Border Softness", Range(0,1)) = 0
|
||||
|
||||
[HDR]_GlowColor ("Color", Color) = (0, 1, 0, 0.5)
|
||||
_GlowColor ("Color", Color) = (0, 1, 0, 0.5)
|
||||
_GlowOffset ("Offset", Range(-1,1)) = 0
|
||||
_GlowInner ("Inner", Range(0,1)) = 0.05
|
||||
_GlowOuter ("Outer", Range(0,1)) = 0.05
|
||||
@@ -127,17 +127,18 @@ SubShader {
|
||||
#include "TMPro_Properties.cginc"
|
||||
#include "TMPro.cginc"
|
||||
|
||||
struct vertex_t {
|
||||
struct vertex_t
|
||||
{
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
float4 position : POSITION;
|
||||
float3 normal : NORMAL;
|
||||
fixed4 color : COLOR;
|
||||
float2 texcoord0 : TEXCOORD0;
|
||||
float4 texcoord0 : TEXCOORD0;
|
||||
float2 texcoord1 : TEXCOORD1;
|
||||
};
|
||||
|
||||
|
||||
struct pixel_t {
|
||||
struct pixel_t
|
||||
{
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
UNITY_VERTEX_OUTPUT_STEREO
|
||||
float4 position : SV_POSITION;
|
||||
@@ -147,16 +148,20 @@ SubShader {
|
||||
float4 mask : TEXCOORD2; // Position in object space(xy), pixel Size(zw)
|
||||
float3 viewDir : TEXCOORD3;
|
||||
|
||||
#if (UNDERLAY_ON || UNDERLAY_INNER)
|
||||
#if (UNDERLAY_ON || UNDERLAY_INNER)
|
||||
float4 texcoord2 : TEXCOORD4; // u,v, scale, bias
|
||||
fixed4 underlayColor : COLOR1;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
float4 textures : TEXCOORD5;
|
||||
};
|
||||
|
||||
// Used by Unity internally to handle Texture Tiling and Offset.
|
||||
float4 _FaceTex_ST;
|
||||
float4 _OutlineTex_ST;
|
||||
uniform float4 _FaceTex_ST;
|
||||
uniform float4 _OutlineTex_ST;
|
||||
uniform float _UIMaskSoftnessX;
|
||||
uniform float _UIMaskSoftnessY;
|
||||
uniform int _UIVertexColorAlwaysGammaSpace;
|
||||
|
||||
pixel_t VertShader(vertex_t input)
|
||||
{
|
||||
@@ -167,7 +172,7 @@ SubShader {
|
||||
UNITY_TRANSFER_INSTANCE_ID(input,output);
|
||||
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output);
|
||||
|
||||
float bold = step(input.texcoord1.y, 0);
|
||||
float bold = step(input.texcoord0.w, 0);
|
||||
|
||||
float4 vert = input.position;
|
||||
vert.x += _VertexOffsetX;
|
||||
@@ -178,7 +183,7 @@ SubShader {
|
||||
float2 pixelSize = vPosition.w;
|
||||
pixelSize /= float2(_ScaleX, _ScaleY) * abs(mul((float2x2)UNITY_MATRIX_P, _ScreenParams.xy));
|
||||
float scale = rsqrt(dot(pixelSize, pixelSize));
|
||||
scale *= abs(input.texcoord1.y) * _GradientScale * (_Sharpness + 1);
|
||||
scale *= abs(input.texcoord0.w) * _GradientScale * (_Sharpness + 1);
|
||||
if (UNITY_MATRIX_P[3][3] == 0) scale = lerp(abs(scale) * (1 - _PerspectiveFilter), scale, abs(dot(UnityObjectToWorldNormal(input.normal.xyz), normalize(WorldSpaceViewDir(vert)))));
|
||||
|
||||
float weight = lerp(_WeightNormal, _WeightBold, bold) / 4.0;
|
||||
@@ -188,13 +193,13 @@ SubShader {
|
||||
|
||||
float alphaClip = (1.0 - _OutlineWidth*_ScaleRatioA - _OutlineSoftness*_ScaleRatioA);
|
||||
|
||||
#if GLOW_ON
|
||||
#if GLOW_ON
|
||||
alphaClip = min(alphaClip, 1.0 - _GlowOffset * _ScaleRatioB - _GlowOuter * _ScaleRatioB);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
alphaClip = alphaClip / 2.0 - ( .5 / scale) - weight;
|
||||
|
||||
#if (UNDERLAY_ON || UNDERLAY_INNER)
|
||||
#if (UNDERLAY_ON || UNDERLAY_INNER)
|
||||
float4 underlayColor = _UnderlayColor;
|
||||
underlayColor.rgb *= underlayColor.a;
|
||||
|
||||
@@ -205,23 +210,28 @@ SubShader {
|
||||
float x = -(_UnderlayOffsetX * _ScaleRatioC) * _GradientScale / _TextureWidth;
|
||||
float y = -(_UnderlayOffsetY * _ScaleRatioC) * _GradientScale / _TextureHeight;
|
||||
float2 bOffset = float2(x, y);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Generate UV for the Masking Texture
|
||||
float4 clampedRect = clamp(_ClipRect, -2e10, 2e10);
|
||||
float2 maskUV = (vert.xy - clampedRect.xy) / (clampedRect.zw - clampedRect.xy);
|
||||
|
||||
// Support for texture tiling and offset
|
||||
float2 textureUV = UnpackUV(input.texcoord1.x);
|
||||
float2 textureUV = input.texcoord1;
|
||||
float2 faceUV = TRANSFORM_TEX(textureUV, _FaceTex);
|
||||
float2 outlineUV = TRANSFORM_TEX(textureUV, _OutlineTex);
|
||||
|
||||
|
||||
if (_UIVertexColorAlwaysGammaSpace && !IsGammaSpace())
|
||||
{
|
||||
input.color.rgb = UIGammaToLinear(input.color.rgb);
|
||||
}
|
||||
output.position = vPosition;
|
||||
output.color = input.color;
|
||||
output.atlas = input.texcoord0;
|
||||
output.param = float4(alphaClip, scale, bias, weight);
|
||||
output.mask = half4(vert.xy * 2 - clampedRect.xy - clampedRect.zw, 0.25 / (0.25 * half2(_MaskSoftnessX, _MaskSoftnessY) + pixelSize.xy));
|
||||
const half2 maskSoftness = half2(max(_UIMaskSoftnessX, _MaskSoftnessX), max(_UIMaskSoftnessY, _MaskSoftnessY));
|
||||
output.mask = half4(vert.xy * 2 - clampedRect.xy - clampedRect.zw, 0.25 / (0.25 * maskSoftness + pixelSize.xy));
|
||||
output.viewDir = mul((float3x3)_EnvMatrix, _WorldSpaceCameraPos.xyz - mul(unity_ObjectToWorld, vert).xyz);
|
||||
#if (UNDERLAY_ON || UNDERLAY_INNER)
|
||||
output.texcoord2 = float4(input.texcoord0 + bOffset, bScale, bBias);
|
||||
@@ -239,9 +249,9 @@ SubShader {
|
||||
|
||||
float c = tex2D(_MainTex, input.atlas).a;
|
||||
|
||||
#ifndef UNDERLAY_ON
|
||||
#ifndef UNDERLAY_ON
|
||||
clip(c - input.param.x);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
float scale = input.param.y;
|
||||
float bias = input.param.z;
|
||||
@@ -261,7 +271,7 @@ SubShader {
|
||||
|
||||
faceColor = GetColor(sd, faceColor, outlineColor, outline, softness);
|
||||
|
||||
#if BEVEL_ON
|
||||
#if BEVEL_ON
|
||||
float3 dxy = float3(0.5 / _TextureWidth, 0.5 / _TextureHeight, 0);
|
||||
float3 n = GetSurfaceNormal(input.atlas, weight, dxy);
|
||||
|
||||
@@ -278,36 +288,35 @@ SubShader {
|
||||
|
||||
fixed4 reflcol = texCUBE(_Cube, reflect(input.viewDir, -n));
|
||||
faceColor.rgb += reflcol.rgb * lerp(_ReflectFaceColor.rgb, _ReflectOutlineColor.rgb, saturate(sd + outline * 0.5)) * faceColor.a;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if UNDERLAY_ON
|
||||
#if UNDERLAY_ON
|
||||
float d = tex2D(_MainTex, input.texcoord2.xy).a * input.texcoord2.z;
|
||||
faceColor += input.underlayColor * saturate(d - input.texcoord2.w) * (1 - faceColor.a);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if UNDERLAY_INNER
|
||||
#if UNDERLAY_INNER
|
||||
float d = tex2D(_MainTex, input.texcoord2.xy).a * input.texcoord2.z;
|
||||
faceColor += input.underlayColor * (1 - saturate(d - input.texcoord2.w)) * saturate(1 - sd) * (1 - faceColor.a);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if GLOW_ON
|
||||
#if GLOW_ON
|
||||
float4 glowColor = GetGlowColor(sd, scale);
|
||||
faceColor.rgb += glowColor.rgb * glowColor.a;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Alternative implementation to UnityGet2DClipping with support for softness.
|
||||
#if UNITY_UI_CLIP_RECT
|
||||
// Alternative implementation to UnityGet2DClipping with support for softness.
|
||||
#if UNITY_UI_CLIP_RECT
|
||||
half2 m = saturate((_ClipRect.zw - _ClipRect.xy - abs(input.mask.xy)) * input.mask.zw);
|
||||
faceColor *= m.x * m.y;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if UNITY_UI_ALPHACLIP
|
||||
#if UNITY_UI_ALPHACLIP
|
||||
clip(faceColor.a - 0.001);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
return faceColor * input.color.a;
|
||||
}
|
||||
|
||||
ENDCG
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,10 +4,10 @@ Properties {
|
||||
_FaceTex ("Face Texture", 2D) = "white" {}
|
||||
_FaceUVSpeedX ("Face UV Speed X", Range(-5, 5)) = 0.0
|
||||
_FaceUVSpeedY ("Face UV Speed Y", Range(-5, 5)) = 0.0
|
||||
[HDR]_FaceColor ("Face Color", Color) = (1,1,1,1)
|
||||
_FaceColor ("Face Color", Color) = (1,1,1,1)
|
||||
_FaceDilate ("Face Dilate", Range(-1,1)) = 0
|
||||
|
||||
[HDR]_OutlineColor ("Outline Color", Color) = (0,0,0,1)
|
||||
_OutlineColor ("Outline Color", Color) = (0,0,0,1)
|
||||
_OutlineTex ("Outline Texture", 2D) = "white" {}
|
||||
_OutlineUVSpeedX ("Outline UV Speed X", Range(-5, 5)) = 0.0
|
||||
_OutlineUVSpeedY ("Outline UV Speed Y", Range(-5, 5)) = 0.0
|
||||
@@ -21,7 +21,7 @@ Properties {
|
||||
_BevelRoundness ("Bevel Roundness", Range(0,1)) = 0
|
||||
|
||||
_LightAngle ("Light Angle", Range(0.0, 6.2831853)) = 3.1416
|
||||
[HDR]_SpecularColor ("Specular", Color) = (1,1,1,1)
|
||||
_SpecularColor ("Specular", Color) = (1,1,1,1)
|
||||
_SpecularPower ("Specular", Range(0,4)) = 2.0
|
||||
_Reflectivity ("Reflectivity", Range(5.0,15.0)) = 10
|
||||
_Diffuse ("Diffuse", Range(0,1)) = 0.5
|
||||
@@ -37,13 +37,13 @@ Properties {
|
||||
_EnvMatrixRotation ("Texture Rotation", vector) = (0, 0, 0, 0)
|
||||
|
||||
|
||||
[HDR]_UnderlayColor ("Border Color", Color) = (0,0,0, 0.5)
|
||||
_UnderlayColor ("Border Color", Color) = (0,0,0, 0.5)
|
||||
_UnderlayOffsetX ("Border OffsetX", Range(-1,1)) = 0
|
||||
_UnderlayOffsetY ("Border OffsetY", Range(-1,1)) = 0
|
||||
_UnderlayDilate ("Border Dilate", Range(-1,1)) = 0
|
||||
_UnderlaySoftness ("Border Softness", Range(0,1)) = 0
|
||||
|
||||
[HDR]_GlowColor ("Color", Color) = (0, 1, 0, 0.5)
|
||||
_GlowColor ("Color", Color) = (0, 1, 0, 0.5)
|
||||
_GlowOffset ("Offset", Range(-1,1)) = 0
|
||||
_GlowInner ("Inner", Range(0,1)) = 0.05
|
||||
_GlowOuter ("Outer", Range(0,1)) = 0.05
|
||||
@@ -109,7 +109,8 @@ SubShader {
|
||||
Blend One OneMinusSrcAlpha
|
||||
ColorMask[_ColorMask]
|
||||
|
||||
Pass {
|
||||
Pass
|
||||
{
|
||||
CGPROGRAM
|
||||
#pragma target 3.0
|
||||
#pragma vertex VertShader
|
||||
@@ -127,17 +128,18 @@ SubShader {
|
||||
#include "TMPro_Properties.cginc"
|
||||
#include "TMPro.cginc"
|
||||
|
||||
struct vertex_t {
|
||||
struct vertex_t
|
||||
{
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
float4 position : POSITION;
|
||||
float3 normal : NORMAL;
|
||||
float4 color : COLOR;
|
||||
float2 texcoord0 : TEXCOORD0;
|
||||
float4 texcoord0 : TEXCOORD0;
|
||||
float2 texcoord1 : TEXCOORD1;
|
||||
};
|
||||
|
||||
|
||||
struct pixel_t {
|
||||
struct pixel_t
|
||||
{
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
UNITY_VERTEX_OUTPUT_STEREO
|
||||
float4 position : SV_POSITION;
|
||||
@@ -147,18 +149,23 @@ SubShader {
|
||||
float2 mask : TEXCOORD2; // Position in object space(xy)
|
||||
float3 viewDir : TEXCOORD3;
|
||||
|
||||
#if (UNDERLAY_ON || UNDERLAY_INNER)
|
||||
#if (UNDERLAY_ON || UNDERLAY_INNER)
|
||||
float2 texcoord2 : TEXCOORD4;
|
||||
float4 underlayColor : COLOR1;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
float4 textures : TEXCOORD5;
|
||||
};
|
||||
|
||||
// Used by Unity internally to handle Texture Tiling and Offset.
|
||||
float4 _FaceTex_ST;
|
||||
float4 _OutlineTex_ST;
|
||||
float _UIMaskSoftnessX;
|
||||
float _UIMaskSoftnessY;
|
||||
int _UIVertexColorAlwaysGammaSpace;
|
||||
|
||||
float4 SRGBToLinear(float4 rgba) {
|
||||
float4 SRGBToLinear(float4 rgba)
|
||||
{
|
||||
return float4(lerp(rgba.rgb / 12.92f, pow((rgba.rgb + 0.055f) / 1.055f, 2.4f), step(0.04045f, rgba.rgb)), rgba.a);
|
||||
}
|
||||
|
||||
@@ -171,7 +178,7 @@ SubShader {
|
||||
UNITY_TRANSFER_INSTANCE_ID(input,output);
|
||||
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output);
|
||||
|
||||
float bold = step(input.texcoord1.y, 0);
|
||||
float bold = step(input.texcoord0.w, 0);
|
||||
|
||||
float4 vert = input.position;
|
||||
vert.x += _VertexOffsetX;
|
||||
@@ -182,27 +189,31 @@ SubShader {
|
||||
float weight = lerp(_WeightNormal, _WeightBold, bold) / 4.0;
|
||||
weight = (weight + _FaceDilate) * _ScaleRatioA * 0.5;
|
||||
|
||||
#if (UNDERLAY_ON || UNDERLAY_INNER)
|
||||
#if (UNDERLAY_ON || UNDERLAY_INNER)
|
||||
float4 underlayColor = _UnderlayColor;
|
||||
underlayColor.rgb *= underlayColor.a;
|
||||
|
||||
float x = -(_UnderlayOffsetX * _ScaleRatioC) * _GradientScale / _TextureWidth;
|
||||
float y = -(_UnderlayOffsetY * _ScaleRatioC) * _GradientScale / _TextureHeight;
|
||||
float2 bOffset = float2(x, y);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Generate UV for the Masking Texture
|
||||
float4 clampedRect = clamp(_ClipRect, -2e10, 2e10);
|
||||
|
||||
// Support for texture tiling and offset
|
||||
float2 textureUV = UnpackUV(input.texcoord1.x);
|
||||
float2 textureUV = input.texcoord1;
|
||||
float2 faceUV = TRANSFORM_TEX(textureUV, _FaceTex);
|
||||
float2 outlineUV = TRANSFORM_TEX(textureUV, _OutlineTex);
|
||||
|
||||
if (_UIVertexColorAlwaysGammaSpace && !IsGammaSpace())
|
||||
{
|
||||
input.color.rgb = UIGammaToLinear(input.color.rgb);
|
||||
}
|
||||
float4 color = input.color;
|
||||
#if (FORCE_LINEAR && !UNITY_COLORSPACE_GAMMA)
|
||||
#if (FORCE_LINEAR && !UNITY_COLORSPACE_GAMMA)
|
||||
color = SRGBToLinear(input.color);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
output.position = vPosition;
|
||||
output.color = color;
|
||||
@@ -210,10 +221,10 @@ SubShader {
|
||||
output.weight = weight;
|
||||
output.mask = half2(vert.xy * 2 - clampedRect.xy - clampedRect.zw);
|
||||
output.viewDir = mul((float3x3)_EnvMatrix, _WorldSpaceCameraPos.xyz - mul(unity_ObjectToWorld, vert).xyz);
|
||||
#if (UNDERLAY_ON || UNDERLAY_INNER)
|
||||
#if (UNDERLAY_ON || UNDERLAY_INNER)
|
||||
output.texcoord2 = input.texcoord0 + bOffset;
|
||||
output.underlayColor = underlayColor;
|
||||
#endif
|
||||
#endif
|
||||
output.textures = float4(faceUV, outlineUV);
|
||||
|
||||
return output;
|
||||
@@ -226,9 +237,9 @@ SubShader {
|
||||
|
||||
float c = tex2D(_MainTex, input.atlas).a;
|
||||
|
||||
float2 pixelSize = float2(ddx(input.atlas.y), ddy(input.atlas.y));
|
||||
pixelSize *= _TextureWidth * .75;
|
||||
float scale = rsqrt(dot(pixelSize, pixelSize)) * _GradientScale * (_Sharpness + 1);
|
||||
float pixelSize = abs(ddx(input.atlas.y)) + abs(ddy(input.atlas.y));
|
||||
pixelSize *= _TextureHeight * 0.75;
|
||||
float scale = 1 / pixelSize * _GradientScale * (_Sharpness + 1);
|
||||
|
||||
float weight = input.weight;
|
||||
float bias = (.5 - weight) + (.5 / scale);
|
||||
@@ -247,7 +258,7 @@ SubShader {
|
||||
|
||||
faceColor = GetColor(sd, faceColor, outlineColor, outline, softness);
|
||||
|
||||
#if BEVEL_ON
|
||||
#if BEVEL_ON
|
||||
float3 dxy = float3(0.5 / _TextureWidth, 0.5 / _TextureHeight, 0);
|
||||
float3 n = GetSurfaceNormal(input.atlas, weight, dxy);
|
||||
|
||||
@@ -264,45 +275,45 @@ SubShader {
|
||||
|
||||
fixed4 reflcol = texCUBE(_Cube, reflect(input.viewDir, -n));
|
||||
faceColor.rgb += reflcol.rgb * lerp(_ReflectFaceColor.rgb, _ReflectOutlineColor.rgb, saturate(sd + outline * 0.5)) * faceColor.a;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if (UNDERLAY_ON || UNDERLAY_INNER)
|
||||
#if (UNDERLAY_ON || UNDERLAY_INNER)
|
||||
float bScale = scale;
|
||||
bScale /= 1 + ((_UnderlaySoftness * _ScaleRatioC) * bScale);
|
||||
float bBias = (0.5 - weight) * bScale - 0.5 - ((_UnderlayDilate * _ScaleRatioC) * 0.5 * bScale);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if UNDERLAY_ON
|
||||
#if UNDERLAY_ON
|
||||
float d = tex2D(_MainTex, input.texcoord2.xy).a * bScale;
|
||||
faceColor += input.underlayColor * saturate(d - bBias) * (1 - faceColor.a);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if UNDERLAY_INNER
|
||||
#if UNDERLAY_INNER
|
||||
float d = tex2D(_MainTex, input.texcoord2.xy).a * bScale;
|
||||
faceColor += input.underlayColor * (1 - saturate(d - bBias)) * saturate(1 - sd) * (1 - faceColor.a);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if GLOW_ON
|
||||
#if GLOW_ON
|
||||
float4 glowColor = GetGlowColor(sd, scale);
|
||||
faceColor.rgb += glowColor.rgb * glowColor.a;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Alternative implementation to UnityGet2DClipping with support for softness.
|
||||
#if UNITY_UI_CLIP_RECT
|
||||
float2 maskZW = 0.25 / (0.25 * half2(_MaskSoftnessX, _MaskSoftnessY) + (1 / scale));
|
||||
#if UNITY_UI_CLIP_RECT
|
||||
half2 maskSoftness = half2(max(_UIMaskSoftnessX, _MaskSoftnessX), max(_UIMaskSoftnessY, _MaskSoftnessY));
|
||||
float2 maskZW = 0.25 / (0.25 * maskSoftness + 1 / scale);
|
||||
half2 m = saturate((_ClipRect.zw - _ClipRect.xy - abs(input.mask.xy)) * maskZW);
|
||||
faceColor *= m.x * m.y;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if UNITY_UI_ALPHACLIP
|
||||
#if UNITY_UI_ALPHACLIP
|
||||
clip(faceColor.a - 0.001);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
return faceColor * input.color.a;
|
||||
}
|
||||
|
||||
ENDCG
|
||||
}
|
||||
ENDCG
|
||||
}
|
||||
}
|
||||
|
||||
Fallback "TextMeshPro/Mobile/Distance Field"
|
||||
|
||||
@@ -6,14 +6,14 @@
|
||||
Shader "TextMeshPro/Mobile/Distance Field - Masking" {
|
||||
|
||||
Properties {
|
||||
[HDR]_FaceColor ("Face Color", Color) = (1,1,1,1)
|
||||
_FaceColor ("Face Color", Color) = (1,1,1,1)
|
||||
_FaceDilate ("Face Dilate", Range(-1,1)) = 0
|
||||
|
||||
[HDR]_OutlineColor ("Outline Color", Color) = (0,0,0,1)
|
||||
_OutlineColor ("Outline Color", Color) = (0,0,0,1)
|
||||
_OutlineWidth ("Outline Thickness", Range(0,1)) = 0
|
||||
_OutlineSoftness ("Outline Softness", Range(0,1)) = 0
|
||||
|
||||
[HDR]_UnderlayColor ("Border Color", Color) = (0,0,0,.5)
|
||||
_UnderlayColor ("Border Color", Color) = (0,0,0,.5)
|
||||
_UnderlayOffsetX ("Border OffsetX", Range(-1,1)) = 0
|
||||
_UnderlayOffsetY ("Border OffsetY", Range(-1,1)) = 0
|
||||
_UnderlayDilate ("Border Dilate", Range(-1,1)) = 0
|
||||
@@ -99,35 +99,41 @@ SubShader {
|
||||
#include "UnityUI.cginc"
|
||||
#include "TMPro_Properties.cginc"
|
||||
|
||||
struct vertex_t {
|
||||
struct vertex_t
|
||||
{
|
||||
float4 vertex : POSITION;
|
||||
float3 normal : NORMAL;
|
||||
fixed4 color : COLOR;
|
||||
float2 texcoord0 : TEXCOORD0;
|
||||
float4 texcoord0 : TEXCOORD0;
|
||||
float2 texcoord1 : TEXCOORD1;
|
||||
};
|
||||
|
||||
struct pixel_t {
|
||||
struct pixel_t
|
||||
{
|
||||
float4 vertex : SV_POSITION;
|
||||
fixed4 faceColor : COLOR;
|
||||
fixed4 outlineColor : COLOR1;
|
||||
float4 texcoord0 : TEXCOORD0; // Texture UV, Mask UV
|
||||
half4 param : TEXCOORD1; // Scale(x), BiasIn(y), BiasOut(z), Bias(w)
|
||||
half4 mask : TEXCOORD2; // Position in clip space(xy), Softness(zw)
|
||||
#if (UNDERLAY_ON | UNDERLAY_INNER)
|
||||
|
||||
#if (UNDERLAY_ON | UNDERLAY_INNER)
|
||||
float4 texcoord1 : TEXCOORD3; // Texture UV, alpha, reserved
|
||||
half2 underlayParam : TEXCOORD4; // Scale(x), Bias(y)
|
||||
#endif
|
||||
#endif
|
||||
};
|
||||
|
||||
float _MaskWipeControl;
|
||||
float _MaskEdgeSoftness;
|
||||
fixed4 _MaskEdgeColor;
|
||||
bool _MaskInverse;
|
||||
float _UIMaskSoftnessX;
|
||||
float _UIMaskSoftnessY;
|
||||
int _UIVertexColorAlwaysGammaSpace;
|
||||
|
||||
pixel_t VertShader(vertex_t input)
|
||||
{
|
||||
float bold = step(input.texcoord1.y, 0);
|
||||
float bold = step(input.texcoord0.w, 0);
|
||||
|
||||
float4 vert = input.vertex;
|
||||
vert.x += _VertexOffsetX;
|
||||
@@ -138,7 +144,7 @@ SubShader {
|
||||
pixelSize /= float2(_ScaleX, _ScaleY) * abs(mul((float2x2)UNITY_MATRIX_P, _ScreenParams.xy));
|
||||
|
||||
float scale = rsqrt(dot(pixelSize, pixelSize));
|
||||
scale *= abs(input.texcoord1.y) * _GradientScale * (_Sharpness + 1);
|
||||
scale *= abs(input.texcoord0.w) * _GradientScale * (_Sharpness + 1);
|
||||
if(UNITY_MATRIX_P[3][3] == 0) scale = lerp(abs(scale) * (1 - _PerspectiveFilter), scale, abs(dot(UnityObjectToWorldNormal(input.normal.xyz), normalize(WorldSpaceViewDir(vert)))));
|
||||
|
||||
float weight = lerp(_WeightNormal, _WeightBold, bold) / 4.0;
|
||||
@@ -150,6 +156,10 @@ SubShader {
|
||||
float bias = (0.5 - weight) * scale - 0.5;
|
||||
float outline = _OutlineWidth * _ScaleRatioA * 0.5 * scale;
|
||||
|
||||
if (_UIVertexColorAlwaysGammaSpace && !IsGammaSpace())
|
||||
{
|
||||
input.color.rgb = UIGammaToLinear(input.color.rgb);
|
||||
}
|
||||
float opacity = input.color.a;
|
||||
#if (UNDERLAY_ON | UNDERLAY_INNER)
|
||||
opacity = 1.0;
|
||||
@@ -163,7 +173,7 @@ SubShader {
|
||||
outlineColor.rgb *= outlineColor.a;
|
||||
outlineColor = lerp(faceColor, outlineColor, sqrt(min(1.0, (outline * 2))));
|
||||
|
||||
#if (UNDERLAY_ON | UNDERLAY_INNER)
|
||||
#if (UNDERLAY_ON | UNDERLAY_INNER)
|
||||
|
||||
layerScale /= 1 + ((_UnderlaySoftness * _ScaleRatioC) * layerScale);
|
||||
float layerBias = (.5 - weight) * layerScale - .5 - ((_UnderlayDilate * _ScaleRatioC) * .5 * layerScale);
|
||||
@@ -171,11 +181,12 @@ SubShader {
|
||||
float x = -(_UnderlayOffsetX * _ScaleRatioC) * _GradientScale / _TextureWidth;
|
||||
float y = -(_UnderlayOffsetY * _ScaleRatioC) * _GradientScale / _TextureHeight;
|
||||
float2 layerOffset = float2(x, y);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Generate UV for the Masking Texture
|
||||
float4 clampedRect = clamp(_ClipRect, -2e10, 2e10);
|
||||
float2 maskUV = (vert.xy - clampedRect.xy) / (clampedRect.zw - clampedRect.xy);
|
||||
const half2 maskSoftness = half2(max(_UIMaskSoftnessX, _MaskSoftnessX), max(_UIMaskSoftnessY, _MaskSoftnessY));
|
||||
|
||||
// Structure for pixel shader
|
||||
pixel_t output = {
|
||||
@@ -184,11 +195,11 @@ SubShader {
|
||||
outlineColor,
|
||||
float4(input.texcoord0.x, input.texcoord0.y, maskUV.x, maskUV.y),
|
||||
half4(scale, bias - outline, bias + outline, bias),
|
||||
half4(vert.xy * 2 - clampedRect.xy - clampedRect.zw, 0.25 / (0.25 * half2(_MaskSoftnessX, _MaskSoftnessY) + pixelSize.xy)),
|
||||
#if (UNDERLAY_ON | UNDERLAY_INNER)
|
||||
half4(vert.xy * 2 - clampedRect.xy - clampedRect.zw, 0.25 / (0.25 * maskSoftness + pixelSize.xy)),
|
||||
#if (UNDERLAY_ON | UNDERLAY_INNER)
|
||||
float4(input.texcoord0 + layerOffset, input.color.a, 0),
|
||||
half2(layerScale, layerBias),
|
||||
#endif
|
||||
#endif
|
||||
};
|
||||
|
||||
return output;
|
||||
@@ -201,41 +212,41 @@ SubShader {
|
||||
half d = tex2D(_MainTex, input.texcoord0.xy).a * input.param.x;
|
||||
half4 c = input.faceColor * saturate(d - input.param.w);
|
||||
|
||||
#ifdef OUTLINE_ON
|
||||
#ifdef OUTLINE_ON
|
||||
c = lerp(input.outlineColor, input.faceColor, saturate(d - input.param.z));
|
||||
c *= saturate(d - input.param.y);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if UNDERLAY_ON
|
||||
#if UNDERLAY_ON
|
||||
d = tex2D(_MainTex, input.texcoord1.xy).a * input.underlayParam.x;
|
||||
c += float4(_UnderlayColor.rgb * _UnderlayColor.a, _UnderlayColor.a) * saturate(d - input.underlayParam.y) * (1 - c.a);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if UNDERLAY_INNER
|
||||
#if UNDERLAY_INNER
|
||||
half sd = saturate(d - input.param.z);
|
||||
d = tex2D(_MainTex, input.texcoord1.xy).a * input.underlayParam.x;
|
||||
c += float4(_UnderlayColor.rgb * _UnderlayColor.a, _UnderlayColor.a) * (1 - saturate(d - input.underlayParam.y)) * sd * (1 - c.a);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Alternative implementation to UnityGet2DClipping with support for softness.
|
||||
//#if UNITY_UI_CLIP_RECT
|
||||
// Alternative implementation to UnityGet2DClipping with support for softness.
|
||||
//#if UNITY_UI_CLIP_RECT
|
||||
half2 m = saturate((_ClipRect.zw - _ClipRect.xy - abs(input.mask.xy)) * input.mask.zw);
|
||||
c *= m.x * m.y;
|
||||
//#endif
|
||||
//#endif
|
||||
|
||||
float a = abs(_MaskInverse - tex2D(_MaskTex, input.texcoord0.zw).a);
|
||||
float t = a + (1 - _MaskWipeControl) * _MaskEdgeSoftness - _MaskWipeControl;
|
||||
a = saturate(t / _MaskEdgeSoftness);
|
||||
c.rgb = lerp(_MaskEdgeColor.rgb*c.a, c.rgb, a);
|
||||
c *= a;
|
||||
float a = abs(_MaskInverse - tex2D(_MaskTex, input.texcoord0.zw).a);
|
||||
float t = a + (1 - _MaskWipeControl) * _MaskEdgeSoftness - _MaskWipeControl;
|
||||
a = saturate(t / _MaskEdgeSoftness);
|
||||
c.rgb = lerp(_MaskEdgeColor.rgb*c.a, c.rgb, a);
|
||||
c *= a;
|
||||
|
||||
#if (UNDERLAY_ON | UNDERLAY_INNER)
|
||||
#if (UNDERLAY_ON | UNDERLAY_INNER)
|
||||
c *= input.texcoord1.z;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if UNITY_UI_ALPHACLIP
|
||||
#if UNITY_UI_ALPHACLIP
|
||||
clip(c.a - 0.001);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
return c;
|
||||
}
|
||||
|
||||
@@ -6,14 +6,14 @@
|
||||
Shader "TextMeshPro/Mobile/Distance Field Overlay" {
|
||||
|
||||
Properties {
|
||||
[HDR]_FaceColor ("Face Color", Color) = (1,1,1,1)
|
||||
_FaceColor ("Face Color", Color) = (1,1,1,1)
|
||||
_FaceDilate ("Face Dilate", Range(-1,1)) = 0
|
||||
|
||||
[HDR]_OutlineColor ("Outline Color", Color) = (0,0,0,1)
|
||||
_OutlineColor ("Outline Color", Color) = (0,0,0,1)
|
||||
_OutlineWidth ("Outline Thickness", Range(0,1)) = 0
|
||||
_OutlineSoftness ("Outline Softness", Range(0,1)) = 0
|
||||
|
||||
[HDR]_UnderlayColor ("Border Color", Color) = (0,0,0,.5)
|
||||
_UnderlayColor ("Border Color", Color) = (0,0,0,.5)
|
||||
_UnderlayOffsetX ("Border OffsetX", Range(-1,1)) = 0
|
||||
_UnderlayOffsetY ("Border OffsetY", Range(-1,1)) = 0
|
||||
_UnderlayDilate ("Border Dilate", Range(-1,1)) = 0
|
||||
@@ -93,16 +93,18 @@ SubShader {
|
||||
#include "UnityUI.cginc"
|
||||
#include "TMPro_Properties.cginc"
|
||||
|
||||
struct vertex_t {
|
||||
struct vertex_t
|
||||
{
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
float4 vertex : POSITION;
|
||||
float3 normal : NORMAL;
|
||||
fixed4 color : COLOR;
|
||||
float2 texcoord0 : TEXCOORD0;
|
||||
float4 texcoord0 : TEXCOORD0;
|
||||
float2 texcoord1 : TEXCOORD1;
|
||||
};
|
||||
|
||||
struct pixel_t {
|
||||
struct pixel_t
|
||||
{
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
UNITY_VERTEX_OUTPUT_STEREO
|
||||
float4 vertex : SV_POSITION;
|
||||
@@ -111,12 +113,17 @@ SubShader {
|
||||
float4 texcoord0 : TEXCOORD0; // Texture UV, Mask UV
|
||||
half4 param : TEXCOORD1; // Scale(x), BiasIn(y), BiasOut(z), Bias(w)
|
||||
half4 mask : TEXCOORD2; // Position in clip space(xy), Softness(zw)
|
||||
#if (UNDERLAY_ON | UNDERLAY_INNER)
|
||||
|
||||
#if (UNDERLAY_ON | UNDERLAY_INNER)
|
||||
float4 texcoord1 : TEXCOORD3; // Texture UV, alpha, reserved
|
||||
half2 underlayParam : TEXCOORD4; // Scale(x), Bias(y)
|
||||
#endif
|
||||
#endif
|
||||
};
|
||||
|
||||
float _UIMaskSoftnessX;
|
||||
float _UIMaskSoftnessY;
|
||||
int _UIVertexColorAlwaysGammaSpace;
|
||||
|
||||
|
||||
pixel_t VertShader(vertex_t input)
|
||||
{
|
||||
@@ -127,7 +134,7 @@ SubShader {
|
||||
UNITY_TRANSFER_INSTANCE_ID(input, output);
|
||||
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output);
|
||||
|
||||
float bold = step(input.texcoord1.y, 0);
|
||||
float bold = step(input.texcoord0.w, 0);
|
||||
|
||||
float4 vert = input.vertex;
|
||||
vert.x += _VertexOffsetX;
|
||||
@@ -138,7 +145,7 @@ SubShader {
|
||||
pixelSize /= float2(_ScaleX, _ScaleY) * abs(mul((float2x2)UNITY_MATRIX_P, _ScreenParams.xy));
|
||||
|
||||
float scale = rsqrt(dot(pixelSize, pixelSize));
|
||||
scale *= abs(input.texcoord1.y) * _GradientScale * (_Sharpness + 1);
|
||||
scale *= abs(input.texcoord0.w) * _GradientScale * (_Sharpness + 1);
|
||||
if(UNITY_MATRIX_P[3][3] == 0) scale = lerp(abs(scale) * (1 - _PerspectiveFilter), scale, abs(dot(UnityObjectToWorldNormal(input.normal.xyz), normalize(WorldSpaceViewDir(vert)))));
|
||||
|
||||
float weight = lerp(_WeightNormal, _WeightBold, bold) / 4.0;
|
||||
@@ -150,10 +157,14 @@ SubShader {
|
||||
float bias = (0.5 - weight) * scale - 0.5;
|
||||
float outline = _OutlineWidth * _ScaleRatioA * 0.5 * scale;
|
||||
|
||||
if (_UIVertexColorAlwaysGammaSpace && !IsGammaSpace())
|
||||
{
|
||||
input.color.rgb = UIGammaToLinear(input.color.rgb);
|
||||
}
|
||||
float opacity = input.color.a;
|
||||
#if (UNDERLAY_ON | UNDERLAY_INNER)
|
||||
#if (UNDERLAY_ON | UNDERLAY_INNER)
|
||||
opacity = 1.0;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
fixed4 faceColor = fixed4(input.color.rgb, opacity) * _FaceColor;
|
||||
faceColor.rgb *= faceColor.a;
|
||||
@@ -163,14 +174,14 @@ SubShader {
|
||||
outlineColor.rgb *= outlineColor.a;
|
||||
outlineColor = lerp(faceColor, outlineColor, sqrt(min(1.0, (outline * 2))));
|
||||
|
||||
#if (UNDERLAY_ON | UNDERLAY_INNER)
|
||||
#if (UNDERLAY_ON | UNDERLAY_INNER)
|
||||
layerScale /= 1 + ((_UnderlaySoftness * _ScaleRatioC) * layerScale);
|
||||
float layerBias = (.5 - weight) * layerScale - .5 - ((_UnderlayDilate * _ScaleRatioC) * .5 * layerScale);
|
||||
|
||||
float x = -(_UnderlayOffsetX * _ScaleRatioC) * _GradientScale / _TextureWidth;
|
||||
float y = -(_UnderlayOffsetY * _ScaleRatioC) * _GradientScale / _TextureHeight;
|
||||
float2 layerOffset = float2(x, y);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Generate UV for the Masking Texture
|
||||
float4 clampedRect = clamp(_ClipRect, -2e10, 2e10);
|
||||
@@ -182,7 +193,8 @@ SubShader {
|
||||
output.outlineColor = outlineColor;
|
||||
output.texcoord0 = float4(input.texcoord0.x, input.texcoord0.y, maskUV.x, maskUV.y);
|
||||
output.param = half4(scale, bias - outline, bias + outline, bias);
|
||||
output.mask = half4(vert.xy * 2 - clampedRect.xy - clampedRect.zw, 0.25 / (0.25 * half2(_MaskSoftnessX, _MaskSoftnessY) + pixelSize.xy));
|
||||
const half2 maskSoftness = half2(max(_UIMaskSoftnessX, _MaskSoftnessX), max(_UIMaskSoftnessY, _MaskSoftnessY));
|
||||
output.mask = half4(vert.xy * 2 - clampedRect.xy - clampedRect.zw, 0.25 / (0.25 * maskSoftness + pixelSize.xy));
|
||||
#if (UNDERLAY_ON || UNDERLAY_INNER)
|
||||
output.texcoord1 = float4(input.texcoord0 + layerOffset, input.color.a, 0);
|
||||
output.underlayParam = half2(layerScale, layerBias);
|
||||
@@ -200,35 +212,35 @@ SubShader {
|
||||
half d = tex2D(_MainTex, input.texcoord0.xy).a * input.param.x;
|
||||
half4 c = input.faceColor * saturate(d - input.param.w);
|
||||
|
||||
#ifdef OUTLINE_ON
|
||||
#ifdef OUTLINE_ON
|
||||
c = lerp(input.outlineColor, input.faceColor, saturate(d - input.param.z));
|
||||
c *= saturate(d - input.param.y);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if UNDERLAY_ON
|
||||
#if UNDERLAY_ON
|
||||
d = tex2D(_MainTex, input.texcoord1.xy).a * input.underlayParam.x;
|
||||
c += float4(_UnderlayColor.rgb * _UnderlayColor.a, _UnderlayColor.a) * saturate(d - input.underlayParam.y) * (1 - c.a);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if UNDERLAY_INNER
|
||||
#if UNDERLAY_INNER
|
||||
half sd = saturate(d - input.param.z);
|
||||
d = tex2D(_MainTex, input.texcoord1.xy).a * input.underlayParam.x;
|
||||
c += float4(_UnderlayColor.rgb * _UnderlayColor.a, _UnderlayColor.a) * (1 - saturate(d - input.underlayParam.y)) * sd * (1 - c.a);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Alternative implementation to UnityGet2DClipping with support for softness.
|
||||
#if UNITY_UI_CLIP_RECT
|
||||
// Alternative implementation to UnityGet2DClipping with support for softness.
|
||||
#if UNITY_UI_CLIP_RECT
|
||||
half2 m = saturate((_ClipRect.zw - _ClipRect.xy - abs(input.mask.xy)) * input.mask.zw);
|
||||
c *= m.x * m.y;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if (UNDERLAY_ON | UNDERLAY_INNER)
|
||||
#if (UNDERLAY_ON | UNDERLAY_INNER)
|
||||
c *= input.texcoord1.z;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if UNITY_UI_ALPHACLIP
|
||||
#if UNITY_UI_ALPHACLIP
|
||||
clip(c.a - 0.001);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
return c;
|
||||
}
|
||||
|
||||
@@ -6,14 +6,14 @@
|
||||
Shader "TextMeshPro/Mobile/Distance Field SSD" {
|
||||
|
||||
Properties {
|
||||
[HDR]_FaceColor ("Face Color", Color) = (1,1,1,1)
|
||||
_FaceColor ("Face Color", Color) = (1,1,1,1)
|
||||
_FaceDilate ("Face Dilate", Range(-1,1)) = 0
|
||||
|
||||
[HDR]_OutlineColor ("Outline Color", Color) = (0,0,0,1)
|
||||
_OutlineColor ("Outline Color", Color) = (0,0,0,1)
|
||||
_OutlineWidth ("Outline Thickness", Range(0,1)) = 0
|
||||
_OutlineSoftness ("Outline Softness", Range(0,1)) = 0
|
||||
|
||||
[HDR]_UnderlayColor ("Border Color", Color) = (0,0,0,.5)
|
||||
_UnderlayColor ("Border Color", Color) = (0,0,0,.5)
|
||||
_UnderlayOffsetX ("Border OffsetX", Range(-1,1)) = 0
|
||||
_UnderlayOffsetY ("Border OffsetY", Range(-1,1)) = 0
|
||||
_UnderlayDilate ("Border Dilate", Range(-1,1)) = 0
|
||||
|
||||
@@ -6,14 +6,14 @@
|
||||
Shader "TextMeshPro/Mobile/Distance Field" {
|
||||
|
||||
Properties {
|
||||
[HDR]_FaceColor ("Face Color", Color) = (1,1,1,1)
|
||||
_FaceColor ("Face Color", Color) = (1,1,1,1)
|
||||
_FaceDilate ("Face Dilate", Range(-1,1)) = 0
|
||||
|
||||
[HDR]_OutlineColor ("Outline Color", Color) = (0,0,0,1)
|
||||
_OutlineColor ("Outline Color", Color) = (0,0,0,1)
|
||||
_OutlineWidth ("Outline Thickness", Range(0,1)) = 0
|
||||
_OutlineSoftness ("Outline Softness", Range(0,1)) = 0
|
||||
|
||||
[HDR]_UnderlayColor ("Border Color", Color) = (0,0,0,.5)
|
||||
_UnderlayColor ("Border Color", Color) = (0,0,0,.5)
|
||||
_UnderlayOffsetX ("Border OffsetX", Range(-1,1)) = 0
|
||||
_UnderlayOffsetY ("Border OffsetY", Range(-1,1)) = 0
|
||||
_UnderlayDilate ("Border Dilate", Range(-1,1)) = 0
|
||||
@@ -81,6 +81,7 @@ SubShader {
|
||||
|
||||
Pass {
|
||||
CGPROGRAM
|
||||
#pragma enable_d3d11_debug_symbols
|
||||
#pragma vertex VertShader
|
||||
#pragma fragment PixShader
|
||||
#pragma shader_feature __ OUTLINE_ON
|
||||
@@ -98,7 +99,7 @@ SubShader {
|
||||
float4 vertex : POSITION;
|
||||
float3 normal : NORMAL;
|
||||
fixed4 color : COLOR;
|
||||
float2 texcoord0 : TEXCOORD0;
|
||||
float4 texcoord0 : TEXCOORD0;
|
||||
float2 texcoord1 : TEXCOORD1;
|
||||
};
|
||||
|
||||
@@ -117,6 +118,9 @@ SubShader {
|
||||
#endif
|
||||
};
|
||||
|
||||
float _UIMaskSoftnessX;
|
||||
float _UIMaskSoftnessY;
|
||||
int _UIVertexColorAlwaysGammaSpace;
|
||||
|
||||
pixel_t VertShader(vertex_t input)
|
||||
{
|
||||
@@ -127,7 +131,7 @@ SubShader {
|
||||
UNITY_TRANSFER_INSTANCE_ID(input, output);
|
||||
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output);
|
||||
|
||||
float bold = step(input.texcoord1.y, 0);
|
||||
float bold = step(input.texcoord0.w, 0);
|
||||
|
||||
float4 vert = input.vertex;
|
||||
vert.x += _VertexOffsetX;
|
||||
@@ -138,7 +142,7 @@ SubShader {
|
||||
pixelSize /= float2(_ScaleX, _ScaleY) * abs(mul((float2x2)UNITY_MATRIX_P, _ScreenParams.xy));
|
||||
|
||||
float scale = rsqrt(dot(pixelSize, pixelSize));
|
||||
scale *= abs(input.texcoord1.y) * _GradientScale * (_Sharpness + 1);
|
||||
scale *= abs(input.texcoord0.w) * _GradientScale * (_Sharpness + 1);
|
||||
if(UNITY_MATRIX_P[3][3] == 0) scale = lerp(abs(scale) * (1 - _PerspectiveFilter), scale, abs(dot(UnityObjectToWorldNormal(input.normal.xyz), normalize(WorldSpaceViewDir(vert)))));
|
||||
|
||||
float weight = lerp(_WeightNormal, _WeightBold, bold) / 4.0;
|
||||
@@ -150,7 +154,11 @@ SubShader {
|
||||
float bias = (0.5 - weight) * scale - 0.5;
|
||||
float outline = _OutlineWidth * _ScaleRatioA * 0.5 * scale;
|
||||
|
||||
float opacity = input.color.a;
|
||||
if (_UIVertexColorAlwaysGammaSpace && !IsGammaSpace())
|
||||
{
|
||||
input.color.rgb = UIGammaToLinear(input.color.rgb);
|
||||
}
|
||||
float opacity = input.color.a;
|
||||
#if (UNDERLAY_ON | UNDERLAY_INNER)
|
||||
opacity = 1.0;
|
||||
#endif
|
||||
@@ -182,7 +190,9 @@ SubShader {
|
||||
output.outlineColor = outlineColor;
|
||||
output.texcoord0 = float4(input.texcoord0.x, input.texcoord0.y, maskUV.x, maskUV.y);
|
||||
output.param = half4(scale, bias - outline, bias + outline, bias);
|
||||
output.mask = half4(vert.xy * 2 - clampedRect.xy - clampedRect.zw, 0.25 / (0.25 * half2(_MaskSoftnessX, _MaskSoftnessY) + pixelSize.xy));
|
||||
|
||||
const half2 maskSoftness = half2(max(_UIMaskSoftnessX, _MaskSoftnessX), max(_UIMaskSoftnessY, _MaskSoftnessY));
|
||||
output.mask = half4(vert.xy * 2 - clampedRect.xy - clampedRect.zw, 0.25 / (0.25 * maskSoftness + pixelSize.xy));
|
||||
#if (UNDERLAY_ON || UNDERLAY_INNER)
|
||||
output.texcoord1 = float4(input.texcoord0 + layerOffset, input.color.a, 0);
|
||||
output.underlayParam = half2(layerScale, layerBias);
|
||||
|
||||
@@ -7,15 +7,15 @@ Shader "TextMeshPro/Mobile/Distance Field (Surface)" {
|
||||
|
||||
Properties {
|
||||
_FaceTex ("Fill Texture", 2D) = "white" {}
|
||||
[HDR]_FaceColor ("Fill Color", Color) = (1,1,1,1)
|
||||
_FaceColor ("Fill Color", Color) = (1,1,1,1)
|
||||
_FaceDilate ("Face Dilate", Range(-1,1)) = 0
|
||||
|
||||
[HDR]_OutlineColor ("Outline Color", Color) = (0,0,0,1)
|
||||
_OutlineColor ("Outline Color", Color) = (0,0,0,1)
|
||||
_OutlineTex ("Outline Texture", 2D) = "white" {}
|
||||
_OutlineWidth ("Outline Thickness", Range(0, 1)) = 0
|
||||
_OutlineSoftness ("Outline Softness", Range(0,1)) = 0
|
||||
|
||||
[HDR]_GlowColor ("Color", Color) = (0, 1, 0, 0.5)
|
||||
_GlowColor ("Color", Color) = (0, 1, 0, 0.5)
|
||||
_GlowOffset ("Offset", Range(-1,1)) = 0
|
||||
_GlowInner ("Inner", Range(0,1)) = 0.05
|
||||
_GlowOuter ("Outer", Range(0,1)) = 0.05
|
||||
@@ -99,7 +99,8 @@ SubShader {
|
||||
#pragma multi_compile_shadowcaster
|
||||
#include "UnityCG.cginc"
|
||||
|
||||
struct v2f {
|
||||
struct v2f
|
||||
{
|
||||
V2F_SHADOW_CASTER;
|
||||
float2 uv : TEXCOORD1;
|
||||
float2 uv2 : TEXCOORD3;
|
||||
|
||||
@@ -4,10 +4,10 @@ Properties {
|
||||
_FaceTex ("Fill Texture", 2D) = "white" {}
|
||||
_FaceUVSpeedX ("Face UV Speed X", Range(-5, 5)) = 0.0
|
||||
_FaceUVSpeedY ("Face UV Speed Y", Range(-5, 5)) = 0.0
|
||||
[HDR]_FaceColor ("Fill Color", Color) = (1,1,1,1)
|
||||
_FaceColor ("Fill Color", Color) = (1,1,1,1)
|
||||
_FaceDilate ("Face Dilate", Range(-1,1)) = 0
|
||||
|
||||
[HDR]_OutlineColor ("Outline Color", Color) = (0,0,0,1)
|
||||
_OutlineColor ("Outline Color", Color) = (0,0,0,1)
|
||||
_OutlineTex ("Outline Texture", 2D) = "white" {}
|
||||
_OutlineUVSpeedX ("Outline UV Speed X", Range(-5, 5)) = 0.0
|
||||
_OutlineUVSpeedY ("Outline UV Speed Y", Range(-5, 5)) = 0.0
|
||||
@@ -28,12 +28,12 @@ Properties {
|
||||
_ReflectOutlineColor ("Outline Color", Color) = (0,0,0,1)
|
||||
_Cube ("Reflection Cubemap", Cube) = "black" { /* TexGen CubeReflect */ }
|
||||
_EnvMatrixRotation ("Texture Rotation", vector) = (0, 0, 0, 0)
|
||||
[HDR]_SpecColor ("Specular Color", Color) = (0,0,0,1)
|
||||
_SpecColor ("Specular Color", Color) = (0,0,0,1)
|
||||
|
||||
_FaceShininess ("Face Shininess", Range(0,1)) = 0
|
||||
_OutlineShininess ("Outline Shininess", Range(0,1)) = 0
|
||||
|
||||
[HDR]_GlowColor ("Color", Color) = (0, 1, 0, 0.5)
|
||||
_GlowColor ("Color", Color) = (0, 1, 0, 0.5)
|
||||
_GlowOffset ("Offset", Range(-1,1)) = 0
|
||||
_GlowInner ("Inner", Range(0,1)) = 0.05
|
||||
_GlowOuter ("Outer", Range(0,1)) = 0.05
|
||||
@@ -118,7 +118,8 @@ SubShader {
|
||||
#pragma multi_compile_shadowcaster
|
||||
#include "UnityCG.cginc"
|
||||
|
||||
struct v2f {
|
||||
struct v2f
|
||||
{
|
||||
V2F_SHADOW_CASTER;
|
||||
float2 uv : TEXCOORD1;
|
||||
float2 uv2 : TEXCOORD3;
|
||||
|
||||
@@ -4,10 +4,10 @@ Properties {
|
||||
_FaceTex ("Face Texture", 2D) = "white" {}
|
||||
_FaceUVSpeedX ("Face UV Speed X", Range(-5, 5)) = 0.0
|
||||
_FaceUVSpeedY ("Face UV Speed Y", Range(-5, 5)) = 0.0
|
||||
[HDR]_FaceColor ("Face Color", Color) = (1,1,1,1)
|
||||
_FaceColor ("Face Color", Color) = (1,1,1,1)
|
||||
_FaceDilate ("Face Dilate", Range(-1,1)) = 0
|
||||
|
||||
[HDR]_OutlineColor ("Outline Color", Color) = (0,0,0,1)
|
||||
_OutlineColor ("Outline Color", Color) = (0,0,0,1)
|
||||
_OutlineTex ("Outline Texture", 2D) = "white" {}
|
||||
_OutlineUVSpeedX ("Outline UV Speed X", Range(-5, 5)) = 0.0
|
||||
_OutlineUVSpeedY ("Outline UV Speed Y", Range(-5, 5)) = 0.0
|
||||
@@ -21,7 +21,7 @@ Properties {
|
||||
_BevelRoundness ("Bevel Roundness", Range(0,1)) = 0
|
||||
|
||||
_LightAngle ("Light Angle", Range(0.0, 6.2831853)) = 3.1416
|
||||
[HDR]_SpecularColor ("Specular", Color) = (1,1,1,1)
|
||||
_SpecularColor ("Specular", Color) = (1,1,1,1)
|
||||
_SpecularPower ("Specular", Range(0,4)) = 2.0
|
||||
_Reflectivity ("Reflectivity", Range(5.0,15.0)) = 10
|
||||
_Diffuse ("Diffuse", Range(0,1)) = 0.5
|
||||
@@ -37,13 +37,13 @@ Properties {
|
||||
_EnvMatrixRotation ("Texture Rotation", vector) = (0, 0, 0, 0)
|
||||
|
||||
|
||||
[HDR]_UnderlayColor ("Border Color", Color) = (0,0,0, 0.5)
|
||||
_UnderlayColor ("Border Color", Color) = (0,0,0, 0.5)
|
||||
_UnderlayOffsetX ("Border OffsetX", Range(-1,1)) = 0
|
||||
_UnderlayOffsetY ("Border OffsetY", Range(-1,1)) = 0
|
||||
_UnderlayDilate ("Border Dilate", Range(-1,1)) = 0
|
||||
_UnderlaySoftness ("Border Softness", Range(0,1)) = 0
|
||||
|
||||
[HDR]_GlowColor ("Color", Color) = (0, 1, 0, 0.5)
|
||||
_GlowColor ("Color", Color) = (0, 1, 0, 0.5)
|
||||
_GlowOffset ("Offset", Range(-1,1)) = 0
|
||||
_GlowInner ("Inner", Range(0,1)) = 0.05
|
||||
_GlowOuter ("Outer", Range(0,1)) = 0.05
|
||||
@@ -127,17 +127,18 @@ SubShader {
|
||||
#include "TMPro_Properties.cginc"
|
||||
#include "TMPro.cginc"
|
||||
|
||||
struct vertex_t {
|
||||
struct vertex_t
|
||||
{
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
float4 position : POSITION;
|
||||
float3 normal : NORMAL;
|
||||
fixed4 color : COLOR;
|
||||
float2 texcoord0 : TEXCOORD0;
|
||||
float4 texcoord0 : TEXCOORD0;
|
||||
float2 texcoord1 : TEXCOORD1;
|
||||
};
|
||||
|
||||
|
||||
struct pixel_t {
|
||||
struct pixel_t
|
||||
{
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
UNITY_VERTEX_OUTPUT_STEREO
|
||||
float4 position : SV_POSITION;
|
||||
@@ -147,16 +148,20 @@ SubShader {
|
||||
float4 mask : TEXCOORD2; // Position in object space(xy), pixel Size(zw)
|
||||
float3 viewDir : TEXCOORD3;
|
||||
|
||||
#if (UNDERLAY_ON || UNDERLAY_INNER)
|
||||
#if (UNDERLAY_ON || UNDERLAY_INNER)
|
||||
float4 texcoord2 : TEXCOORD4; // u,v, scale, bias
|
||||
fixed4 underlayColor : COLOR1;
|
||||
#endif
|
||||
float4 textures : TEXCOORD5;
|
||||
#endif
|
||||
|
||||
float4 textures : TEXCOORD5;
|
||||
};
|
||||
|
||||
// Used by Unity internally to handle Texture Tiling and Offset.
|
||||
float4 _FaceTex_ST;
|
||||
float4 _OutlineTex_ST;
|
||||
float _UIMaskSoftnessX;
|
||||
float _UIMaskSoftnessY;
|
||||
int _UIVertexColorAlwaysGammaSpace;
|
||||
|
||||
pixel_t VertShader(vertex_t input)
|
||||
{
|
||||
@@ -167,7 +172,7 @@ SubShader {
|
||||
UNITY_TRANSFER_INSTANCE_ID(input,output);
|
||||
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output);
|
||||
|
||||
float bold = step(input.texcoord1.y, 0);
|
||||
float bold = step(input.texcoord0.w, 0);
|
||||
|
||||
float4 vert = input.position;
|
||||
vert.x += _VertexOffsetX;
|
||||
@@ -178,7 +183,7 @@ SubShader {
|
||||
float2 pixelSize = vPosition.w;
|
||||
pixelSize /= float2(_ScaleX, _ScaleY) * abs(mul((float2x2)UNITY_MATRIX_P, _ScreenParams.xy));
|
||||
float scale = rsqrt(dot(pixelSize, pixelSize));
|
||||
scale *= abs(input.texcoord1.y) * _GradientScale * (_Sharpness + 1);
|
||||
scale *= abs(input.texcoord0.w) * _GradientScale * (_Sharpness + 1);
|
||||
if (UNITY_MATRIX_P[3][3] == 0) scale = lerp(abs(scale) * (1 - _PerspectiveFilter), scale, abs(dot(UnityObjectToWorldNormal(input.normal.xyz), normalize(WorldSpaceViewDir(vert)))));
|
||||
|
||||
float weight = lerp(_WeightNormal, _WeightBold, bold) / 4.0;
|
||||
@@ -188,13 +193,13 @@ SubShader {
|
||||
|
||||
float alphaClip = (1.0 - _OutlineWidth * _ScaleRatioA - _OutlineSoftness * _ScaleRatioA);
|
||||
|
||||
#if GLOW_ON
|
||||
#if GLOW_ON
|
||||
alphaClip = min(alphaClip, 1.0 - _GlowOffset * _ScaleRatioB - _GlowOuter * _ScaleRatioB);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
alphaClip = alphaClip / 2.0 - ( .5 / scale) - weight;
|
||||
|
||||
#if (UNDERLAY_ON || UNDERLAY_INNER)
|
||||
#if (UNDERLAY_ON || UNDERLAY_INNER)
|
||||
float4 underlayColor = _UnderlayColor;
|
||||
underlayColor.rgb *= underlayColor.a;
|
||||
|
||||
@@ -205,23 +210,28 @@ SubShader {
|
||||
float x = -(_UnderlayOffsetX * _ScaleRatioC) * _GradientScale / _TextureWidth;
|
||||
float y = -(_UnderlayOffsetY * _ScaleRatioC) * _GradientScale / _TextureHeight;
|
||||
float2 bOffset = float2(x, y);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Generate UV for the Masking Texture
|
||||
float4 clampedRect = clamp(_ClipRect, -2e10, 2e10);
|
||||
float2 maskUV = (vert.xy - clampedRect.xy) / (clampedRect.zw - clampedRect.xy);
|
||||
|
||||
// Support for texture tiling and offset
|
||||
float2 textureUV = UnpackUV(input.texcoord1.x);
|
||||
float2 textureUV = input.texcoord1;
|
||||
float2 faceUV = TRANSFORM_TEX(textureUV, _FaceTex);
|
||||
float2 outlineUV = TRANSFORM_TEX(textureUV, _OutlineTex);
|
||||
|
||||
|
||||
if (_UIVertexColorAlwaysGammaSpace && !IsGammaSpace())
|
||||
{
|
||||
input.color.rgb = UIGammaToLinear(input.color.rgb);
|
||||
}
|
||||
output.position = vPosition;
|
||||
output.color = input.color;
|
||||
output.atlas = input.texcoord0;
|
||||
output.param = float4(alphaClip, scale, bias, weight);
|
||||
output.mask = half4(vert.xy * 2 - clampedRect.xy - clampedRect.zw, 0.25 / (0.25 * half2(_MaskSoftnessX, _MaskSoftnessY) + pixelSize.xy));
|
||||
const half2 maskSoftness = half2(max(_UIMaskSoftnessX, _MaskSoftnessX), max(_UIMaskSoftnessY, _MaskSoftnessY));
|
||||
output.mask = half4(vert.xy * 2 - clampedRect.xy - clampedRect.zw, 0.25 / (0.25 * maskSoftness + pixelSize.xy));
|
||||
output.viewDir = mul((float3x3)_EnvMatrix, _WorldSpaceCameraPos.xyz - mul(unity_ObjectToWorld, vert).xyz);
|
||||
#if (UNDERLAY_ON || UNDERLAY_INNER)
|
||||
output.texcoord2 = float4(input.texcoord0 + bOffset, bScale, bBias);
|
||||
@@ -239,9 +249,9 @@ SubShader {
|
||||
|
||||
float c = tex2D(_MainTex, input.atlas).a;
|
||||
|
||||
#ifndef UNDERLAY_ON
|
||||
#ifndef UNDERLAY_ON
|
||||
clip(c - input.param.x);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
float scale = input.param.y;
|
||||
float bias = input.param.z;
|
||||
@@ -261,7 +271,7 @@ SubShader {
|
||||
|
||||
faceColor = GetColor(sd, faceColor, outlineColor, outline, softness);
|
||||
|
||||
#if BEVEL_ON
|
||||
#if BEVEL_ON
|
||||
float3 dxy = float3(0.5 / _TextureWidth, 0.5 / _TextureHeight, 0);
|
||||
float3 n = GetSurfaceNormal(input.atlas, weight, dxy);
|
||||
|
||||
@@ -278,36 +288,35 @@ SubShader {
|
||||
|
||||
fixed4 reflcol = texCUBE(_Cube, reflect(input.viewDir, -n));
|
||||
faceColor.rgb += reflcol.rgb * lerp(_ReflectFaceColor.rgb, _ReflectOutlineColor.rgb, saturate(sd + outline * 0.5)) * faceColor.a;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if UNDERLAY_ON
|
||||
#if UNDERLAY_ON
|
||||
float d = tex2D(_MainTex, input.texcoord2.xy).a * input.texcoord2.z;
|
||||
faceColor += input.underlayColor * saturate(d - input.texcoord2.w) * (1 - faceColor.a);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if UNDERLAY_INNER
|
||||
#if UNDERLAY_INNER
|
||||
float d = tex2D(_MainTex, input.texcoord2.xy).a * input.texcoord2.z;
|
||||
faceColor += input.underlayColor * (1 - saturate(d - input.texcoord2.w)) * saturate(1 - sd) * (1 - faceColor.a);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if GLOW_ON
|
||||
#if GLOW_ON
|
||||
float4 glowColor = GetGlowColor(sd, scale);
|
||||
faceColor.rgb += glowColor.rgb * glowColor.a;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Alternative implementation to UnityGet2DClipping with support for softness.
|
||||
#if UNITY_UI_CLIP_RECT
|
||||
#if UNITY_UI_CLIP_RECT
|
||||
half2 m = saturate((_ClipRect.zw - _ClipRect.xy - abs(input.mask.xy)) * input.mask.zw);
|
||||
faceColor *= m.x * m.y;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if UNITY_UI_ALPHACLIP
|
||||
#if UNITY_UI_ALPHACLIP
|
||||
clip(faceColor.a - 0.001);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
return faceColor * input.color.a;
|
||||
return faceColor * input.color.a;
|
||||
}
|
||||
|
||||
ENDCG
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,18 +2,18 @@ Shader "TextMeshPro/Sprite"
|
||||
{
|
||||
Properties
|
||||
{
|
||||
[PerRendererData] _MainTex ("Sprite Texture", 2D) = "white" {}
|
||||
_Color ("Tint", Color) = (1,1,1,1)
|
||||
|
||||
_StencilComp ("Stencil Comparison", Float) = 8
|
||||
_Stencil ("Stencil ID", Float) = 0
|
||||
_StencilOp ("Stencil Operation", Float) = 0
|
||||
_StencilWriteMask ("Stencil Write Mask", Float) = 255
|
||||
_StencilReadMask ("Stencil Read Mask", Float) = 255
|
||||
|
||||
_CullMode ("Cull Mode", Float) = 0
|
||||
_ColorMask ("Color Mask", Float) = 15
|
||||
_ClipRect ("Clip Rect", vector) = (-32767, -32767, 32767, 32767)
|
||||
_MainTex ("Sprite Texture", 2D) = "white" {}
|
||||
_Color ("Tint", Color) = (1,1,1,1)
|
||||
|
||||
_StencilComp ("Stencil Comparison", Float) = 8
|
||||
_Stencil ("Stencil ID", Float) = 0
|
||||
_StencilOp ("Stencil Operation", Float) = 0
|
||||
_StencilWriteMask ("Stencil Write Mask", Float) = 255
|
||||
_StencilReadMask ("Stencil Read Mask", Float) = 255
|
||||
|
||||
_CullMode ("Cull Mode", Float) = 0
|
||||
_ColorMask ("Color Mask", Float) = 15
|
||||
_ClipRect ("Clip Rect", vector) = (-32767, -32767, 32767, 32767)
|
||||
|
||||
[Toggle(UNITY_UI_ALPHACLIP)] _UseUIAlphaClip ("Use Alpha Clip", Float) = 0
|
||||
}
|
||||
@@ -21,19 +21,19 @@ Shader "TextMeshPro/Sprite"
|
||||
SubShader
|
||||
{
|
||||
Tags
|
||||
{
|
||||
"Queue"="Transparent"
|
||||
"IgnoreProjector"="True"
|
||||
"RenderType"="Transparent"
|
||||
{
|
||||
"Queue"="Transparent"
|
||||
"IgnoreProjector"="True"
|
||||
"RenderType"="Transparent"
|
||||
"PreviewType"="Plane"
|
||||
"CanUseSpriteAtlas"="True"
|
||||
}
|
||||
|
||||
|
||||
Stencil
|
||||
{
|
||||
Ref [_Stencil]
|
||||
Comp [_StencilComp]
|
||||
Pass [_StencilOp]
|
||||
Pass [_StencilOp]
|
||||
ReadMask [_StencilReadMask]
|
||||
WriteMask [_StencilWriteMask]
|
||||
}
|
||||
@@ -58,7 +58,7 @@ Shader "TextMeshPro/Sprite"
|
||||
|
||||
#pragma multi_compile __ UNITY_UI_CLIP_RECT
|
||||
#pragma multi_compile __ UNITY_UI_ALPHACLIP
|
||||
|
||||
|
||||
struct appdata_t
|
||||
{
|
||||
float4 vertex : POSITION;
|
||||
@@ -69,29 +69,43 @@ Shader "TextMeshPro/Sprite"
|
||||
|
||||
struct v2f
|
||||
{
|
||||
float4 vertex : SV_POSITION;
|
||||
fixed4 color : COLOR;
|
||||
float2 texcoord : TEXCOORD0;
|
||||
float4 worldPosition : TEXCOORD1;
|
||||
float4 vertex : SV_POSITION;
|
||||
fixed4 color : COLOR;
|
||||
float2 texcoord : TEXCOORD0;
|
||||
float4 worldPosition : TEXCOORD1;
|
||||
float4 mask : TEXCOORD2;
|
||||
UNITY_VERTEX_OUTPUT_STEREO
|
||||
};
|
||||
|
||||
|
||||
sampler2D _MainTex;
|
||||
fixed4 _Color;
|
||||
fixed4 _TextureSampleAdd;
|
||||
float4 _ClipRect;
|
||||
float4 _MainTex_ST;
|
||||
float _UIMaskSoftnessX;
|
||||
float _UIMaskSoftnessY;
|
||||
int _UIVertexColorAlwaysGammaSpace;
|
||||
|
||||
v2f vert(appdata_t v)
|
||||
{
|
||||
v2f OUT;
|
||||
UNITY_SETUP_INSTANCE_ID(v);
|
||||
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(OUT);
|
||||
OUT.worldPosition = v.vertex;
|
||||
OUT.vertex = UnityObjectToClipPos(OUT.worldPosition);
|
||||
float4 vPosition = UnityObjectToClipPos(v.vertex);
|
||||
OUT.worldPosition = v.vertex;
|
||||
OUT.vertex = vPosition;
|
||||
|
||||
float2 pixelSize = vPosition.w;
|
||||
pixelSize /= abs(mul((float2x2)UNITY_MATRIX_P, _ScreenParams.xy));
|
||||
|
||||
float4 clampedRect = clamp(_ClipRect, -2e10, 2e10);
|
||||
OUT.texcoord = TRANSFORM_TEX(v.texcoord, _MainTex);
|
||||
|
||||
OUT.mask = half4(v.vertex.xy * 2 - clampedRect.xy - clampedRect.zw, 0.25 / (0.25 * half2(_UIMaskSoftnessX, _UIMaskSoftnessY) + abs(pixelSize.xy)));
|
||||
|
||||
if (_UIVertexColorAlwaysGammaSpace && !IsGammaSpace())
|
||||
{
|
||||
v.color.rgb = UIGammaToLinear(v.color.rgb);
|
||||
}
|
||||
OUT.color = v.color * _Color;
|
||||
return OUT;
|
||||
}
|
||||
@@ -99,9 +113,10 @@ Shader "TextMeshPro/Sprite"
|
||||
fixed4 frag(v2f IN) : SV_Target
|
||||
{
|
||||
half4 color = (tex2D(_MainTex, IN.texcoord) + _TextureSampleAdd) * IN.color;
|
||||
|
||||
#ifdef UNITY_UI_CLIP_RECT
|
||||
color.a *= UnityGet2DClipping(IN.worldPosition.xy, _ClipRect);
|
||||
|
||||
#if UNITY_UI_CLIP_RECT
|
||||
half2 m = saturate((_ClipRect.zw - _ClipRect.xy - abs(IN.mask.xy)) * IN.mask.zw);
|
||||
color *= m.x * m.y;
|
||||
#endif
|
||||
|
||||
#ifdef UNITY_UI_ALPHACLIP
|
||||
@@ -110,7 +125,7 @@ Shader "TextMeshPro/Sprite"
|
||||
|
||||
return color;
|
||||
}
|
||||
ENDCG
|
||||
ENDCG
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ ShaderImporter:
|
||||
externalObjects: {}
|
||||
defaultTextures: []
|
||||
nonModifiableTextures: []
|
||||
userData:
|
||||
userData: Version 2.0
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
|
||||
@@ -1,20 +1,22 @@
|
||||
struct vertex_t {
|
||||
struct vertex_t
|
||||
{
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
float4 position : POSITION;
|
||||
float3 normal : NORMAL;
|
||||
float4 color : COLOR;
|
||||
float2 texcoord0 : TEXCOORD0;
|
||||
float4 texcoord0 : TEXCOORD0;
|
||||
float2 texcoord1 : TEXCOORD1;
|
||||
};
|
||||
|
||||
struct pixel_t {
|
||||
struct pixel_t
|
||||
{
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
UNITY_VERTEX_OUTPUT_STEREO
|
||||
float4 position : SV_POSITION;
|
||||
float4 faceColor : COLOR;
|
||||
float4 outlineColor : COLOR1;
|
||||
float4 texcoord0 : TEXCOORD0;
|
||||
float4 param : TEXCOORD1; // weight, scaleRatio
|
||||
float4 param : TEXCOORD1; // x = weight, y = no longer used
|
||||
float2 mask : TEXCOORD2;
|
||||
#if (UNDERLAY_ON || UNDERLAY_INNER)
|
||||
float4 texcoord2 : TEXCOORD3;
|
||||
@@ -22,10 +24,14 @@ struct pixel_t {
|
||||
#endif
|
||||
};
|
||||
|
||||
float4 SRGBToLinear(float4 rgba) {
|
||||
float4 SRGBToLinear(float4 rgba)
|
||||
{
|
||||
return float4(lerp(rgba.rgb / 12.92f, pow((rgba.rgb + 0.055f) / 1.055f, 2.4f), step(0.04045f, rgba.rgb)), rgba.a);
|
||||
}
|
||||
|
||||
float _UIMaskSoftnessX;
|
||||
float _UIMaskSoftnessY;
|
||||
|
||||
pixel_t VertShader(vertex_t input)
|
||||
{
|
||||
pixel_t output;
|
||||
@@ -35,7 +41,7 @@ pixel_t VertShader(vertex_t input)
|
||||
UNITY_TRANSFER_INSTANCE_ID(input, output);
|
||||
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output);
|
||||
|
||||
float bold = step(input.texcoord1.y, 0);
|
||||
float bold = step(input.texcoord0.w, 0);
|
||||
|
||||
float4 vert = input.position;
|
||||
vert.x += _VertexOffsetX;
|
||||
@@ -71,7 +77,7 @@ pixel_t VertShader(vertex_t input)
|
||||
output.faceColor = faceColor;
|
||||
output.outlineColor = outlineColor;
|
||||
output.texcoord0 = float4(input.texcoord0.xy, maskUV.xy);
|
||||
output.param = float4(0.5 - weight, 1.3333 * _GradientScale * (_Sharpness + 1) / _TextureWidth, _OutlineWidth * _ScaleRatioA * 0.5, 0);
|
||||
output.param = float4(0.5 - weight, 0, _OutlineWidth * _ScaleRatioA * 0.5, 0);
|
||||
|
||||
float2 mask = float2(0, 0);
|
||||
#if UNITY_UI_CLIP_RECT
|
||||
@@ -99,8 +105,9 @@ float4 PixShader(pixel_t input) : SV_Target
|
||||
|
||||
float d = tex2D(_MainTex, input.texcoord0.xy).a;
|
||||
|
||||
float2 UV = input.texcoord0.xy;
|
||||
float scale = rsqrt(abs(ddx(UV.x) * ddy(UV.y) - ddy(UV.x) * ddx(UV.y))) * input.param.y;
|
||||
float pixelSize = abs(ddx(input.texcoord0.y)) + abs(ddy(input.texcoord0.y));
|
||||
pixelSize *= _TextureHeight * 0.75;
|
||||
float scale = 1 / pixelSize * _GradientScale * (_Sharpness + 1);
|
||||
|
||||
#if (UNDERLAY_ON | UNDERLAY_INNER)
|
||||
float layerScale = scale;
|
||||
@@ -112,7 +119,7 @@ float4 PixShader(pixel_t input) : SV_Target
|
||||
|
||||
float4 faceColor = input.faceColor * saturate((d - input.param.x) * scale + 0.5);
|
||||
|
||||
#ifdef OUTLINE_ON
|
||||
#if OUTLINE_ON
|
||||
float4 outlineColor = lerp(input.faceColor, input.outlineColor, sqrt(min(1.0, input.param.z * scale * 2)));
|
||||
faceColor = lerp(outlineColor, input.faceColor, saturate((d - input.param.x - input.param.z) * scale + 0.5));
|
||||
faceColor *= saturate((d - input.param.x + input.param.z) * scale + 0.5);
|
||||
@@ -130,7 +137,7 @@ float4 PixShader(pixel_t input) : SV_Target
|
||||
faceColor += float4(_UnderlayColor.rgb * _UnderlayColor.a, _UnderlayColor.a) * (1 - saturate(d - layerBias)) * sd * (1 - faceColor.a);
|
||||
#endif
|
||||
|
||||
#ifdef MASKING
|
||||
#if MASKING
|
||||
float a = abs(_MaskInverse - tex2D(_MaskTex, input.texcoord0.zw).a);
|
||||
float t = a + (1 - _MaskWipeControl) * _MaskEdgeSoftness - _MaskWipeControl;
|
||||
a = saturate(t / _MaskEdgeSoftness);
|
||||
@@ -140,7 +147,8 @@ float4 PixShader(pixel_t input) : SV_Target
|
||||
|
||||
// Alternative implementation to UnityGet2DClipping with support for softness
|
||||
#if UNITY_UI_CLIP_RECT
|
||||
float2 maskZW = 0.25 / (0.25 * half2(_MaskSoftnessX, _MaskSoftnessY) + (1 / scale));
|
||||
half2 maskSoftness = half2(max(_UIMaskSoftnessX, _MaskSoftnessX), max(_UIMaskSoftnessY, _MaskSoftnessY));
|
||||
float2 maskZW = 0.25 / (0.25 * maskSoftness + 1 / scale);
|
||||
float2 m = saturate((_ClipRect.zw - _ClipRect.xy - abs(input.mask.xy)) * maskZW);
|
||||
faceColor *= m.x * m.y;
|
||||
#endif
|
||||
|
||||
@@ -66,11 +66,6 @@ uniform float _MaskID;
|
||||
uniform sampler2D _MaskTex;
|
||||
uniform float4 _MaskCoord;
|
||||
uniform float4 _ClipRect; // bottom left(x,y) : top right(z,w)
|
||||
//uniform float _MaskWipeControl;
|
||||
//uniform float _MaskEdgeSoftness;
|
||||
//uniform fixed4 _MaskEdgeColor;
|
||||
//uniform bool _MaskInverse;
|
||||
|
||||
uniform float _MaskSoftnessX;
|
||||
uniform float _MaskSoftnessY;
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ void VertShader(inout appdata_full v, out Input data)
|
||||
|
||||
UNITY_INITIALIZE_OUTPUT(Input, data);
|
||||
|
||||
float bold = step(v.texcoord1.y, 0);
|
||||
float bold = step(v.texcoord.w, 0);
|
||||
|
||||
// Generate normal for backface
|
||||
float3 view = ObjSpaceViewDir(v.vertex);
|
||||
@@ -20,14 +20,12 @@ void VertShader(inout appdata_full v, out Input data)
|
||||
|
||||
pixelSize /= float2(_ScaleX, _ScaleY) * mul((float2x2)UNITY_MATRIX_P, _ScreenParams.xy);
|
||||
float scale = rsqrt(dot(pixelSize, pixelSize));
|
||||
scale *= abs(v.texcoord1.y) * _GradientScale * (_Sharpness + 1);
|
||||
scale *= abs(v.texcoord.w) * _GradientScale * (_Sharpness + 1);
|
||||
scale = lerp(scale * (1 - _PerspectiveFilter), scale, abs(dot(UnityObjectToWorldNormal(v.normal.xyz), normalize(WorldSpaceViewDir(vert)))));
|
||||
data.param.y = scale;
|
||||
#endif
|
||||
|
||||
data.param.x = (lerp(_WeightNormal, _WeightBold, bold) / 4.0 + _FaceDilate) * _ScaleRatioA * 0.5; //
|
||||
|
||||
v.texcoord1.xy = UnpackUV(v.texcoord1.x);
|
||||
data.param.x = (lerp(_WeightNormal, _WeightBold, bold) / 4.0 + _FaceDilate) * _ScaleRatioA * 0.5; //
|
||||
data.viewDirEnv = mul((float3x3)_EnvMatrix, WorldSpaceViewDir(v.vertex));
|
||||
}
|
||||
|
||||
@@ -82,7 +80,7 @@ void PixShader(Input input, inout SurfaceOutput o)
|
||||
float3 n = float3(0, 0, -1);
|
||||
float3 emission = float3(0, 0, 0);
|
||||
#endif
|
||||
|
||||
|
||||
#if GLOW_ON
|
||||
float4 glowColor = GetGlowColor(sd, scale);
|
||||
glowColor.a *= input.color.a;
|
||||
|
||||
23
FGUIProject/assets/Main/Com/Items/KeyboardInput.xml
Normal file
23
FGUIProject/assets/Main/Com/Items/KeyboardInput.xml
Normal file
@@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<component size="118,30" extention="Button">
|
||||
<controller name="state" pages="2,up,3,down" selected="0"/>
|
||||
<displayList>
|
||||
<image id="n16_5dtx" name="n16" src="kryob" fileName="Images/Square.png" pkg="6hgkvlau" xy="0,0" size="118,30" alpha="0.2" color="#5c748b">
|
||||
<relation target="" sidePair="width-width,height-height"/>
|
||||
</image>
|
||||
<image id="n17_5dtx" name="bottomLine" src="kryob" fileName="Images/Square.png" pkg="6hgkvlau" xy="0,28" size="118,2" alpha="0.2">
|
||||
<gearDisplay controller="state" pages="3"/>
|
||||
<gearLook controller="state" pages="3" values="1,0,0,0" default="0.2,0,0,0"/>
|
||||
<gearColor controller="state" pages="3" values="#8bf3ff" default="#ffffff"/>
|
||||
<relation target="" sidePair="width-width,bottom-bottom"/>
|
||||
</image>
|
||||
<text id="n20_5dtx" name="n20" xy="0,0" size="118,29" fontSize="16" color="#ffffff" align="center" vAlign="middle" autoSize="none" text="输入按键...">
|
||||
<gearDisplay controller="state" pages="3"/>
|
||||
</text>
|
||||
<text id="n21_5dtx" name="TextKeyboard" xy="50,-1" size="16,32" fontSize="22" color="#ffffff" align="center" text="E">
|
||||
<gearDisplay controller="state" pages="2"/>
|
||||
<relation target="" sidePair="center-center"/>
|
||||
</text>
|
||||
</displayList>
|
||||
<Button/>
|
||||
</component>
|
||||
16
FGUIProject/assets/Main/Com/Items/SettingInputItem.xml
Normal file
16
FGUIProject/assets/Main/Com/Items/SettingInputItem.xml
Normal file
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<component size="874,70" extention="Button">
|
||||
<controller name="button" pages="2,up,3,down,4,over,5,selectedOver" selected="2"/>
|
||||
<displayList>
|
||||
<image id="n5_e9z8" name="back" src="kryob" fileName="Images/Square.png" pkg="6hgkvlau" xy="0,0" size="868,70" alpha="0.2" color="#8bf3ff">
|
||||
<gearLook controller="button" pages="3,5" values="0.5,0,0,0|0.5,0,0,0" default="0.2,0,0,0"/>
|
||||
<gearColor controller="button" pages="2,4" values="#5c748b|#8bf3ff" default="#5c748b"/>
|
||||
<relation target="" sidePair="width-width,height-height"/>
|
||||
</image>
|
||||
<text id="n6_e9z8" name="TextName" xy="22,19" size="189,32" fontSize="22" color="#ffffff" text="Screen resolution"/>
|
||||
<component id="n16_5dtx" name="BtnKeyboard" src="5dtx1b" fileName="Com/Items/KeyboardInput.xml" xy="630,20" size="130,30">
|
||||
<relation target="" sidePair="left-right"/>
|
||||
</component>
|
||||
</displayList>
|
||||
<Button mode="Radio"/>
|
||||
</component>
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<component size="874,70" extention="Button">
|
||||
<controller name="style" pages="0,文本,1,进度条,6,键鼠输入,7,手柄输入" selected="0"/>
|
||||
<controller name="style" pages="0,文本,1,进度条" selected="0"/>
|
||||
<controller name="button" pages="2,up,3,down,4,over,5,selectedOver" selected="0"/>
|
||||
<displayList>
|
||||
<image id="n5_e9z8" name="back" src="kryob" fileName="Images/Square.png" pkg="6hgkvlau" xy="0,0" size="868,70" alpha="0.2" color="#5c748b">
|
||||
@@ -28,12 +28,12 @@
|
||||
<gearDisplay2 controller="style" pages="0,1" condition="0"/>
|
||||
<relation target="n9_e9z8" sidePair="middle-middle,right-right"/>
|
||||
</component>
|
||||
<text id="n13_oivj" name="TextSliderValue" xy="772,17" size="34,29" fontSize="20" color="#d8fbff" text="2.9">
|
||||
<text id="n13_oivj" name="TextSliderValue" xy="775,17" size="34,29" fontSize="20" color="#d8fbff" text="2.9">
|
||||
<gearDisplay controller="style" pages="1"/>
|
||||
<relation target="n9_e9z8" sidePair="middle-middle,left-right"/>
|
||||
</text>
|
||||
<component id="n15_5dtx" name="Pages" src="5dtx1a" fileName="Com/SelectPages.xml" pkg="6hgkvlau" xy="620,58" size="130,4" visible="false">
|
||||
<gearDisplay controller="style" pages=""/>
|
||||
<gearDisplay controller="style" pages="0"/>
|
||||
<relation target="n7_e9z8" sidePair="center-center,bottom-bottom"/>
|
||||
</component>
|
||||
</displayList>
|
||||
|
||||
@@ -43,6 +43,8 @@
|
||||
<component id="lvql16" name="MapPanel.xml" path="/" exported="true"/>
|
||||
<component id="j6rn17" name="SettingSubTitleItem.xml" path="/Com/Items/" exported="true"/>
|
||||
<component id="j6rn18" name="SettingMask.xml" path="/Com/"/>
|
||||
<component id="5dtx1b" name="KeyboardInput.xml" path="/Com/Items/"/>
|
||||
<component id="5dtx1c" name="SettingInputItem.xml" path="/Com/Items/" exported="true"/>
|
||||
</resources>
|
||||
<publish name="" path="../Assets/Resources/Fgui/Main" packageCount="2" genCode="true"/>
|
||||
</packageDescription>
|
||||
1
FGUIProject/settings/whoot/hxr7rc7p5dtx1b.json
Normal file
1
FGUIProject/settings/whoot/hxr7rc7p5dtx1b.json
Normal file
@@ -0,0 +1 @@
|
||||
{"url":"ui://hxr7rc7p5dtx1b","name":"KeyboardInput","scriptType":"component","isCustomName":false,"customName":"","annotation":"","member":{}}
|
||||
1
FGUIProject/settings/whoot/hxr7rc7p5dtx1c.json
Normal file
1
FGUIProject/settings/whoot/hxr7rc7p5dtx1c.json
Normal file
@@ -0,0 +1 @@
|
||||
{"url":"ui://hxr7rc7p5dtx1c","name":"SettingInputItem","scriptType":"component","isCustomName":false,"customName":"","annotation":"","member":{}}
|
||||
@@ -10,6 +10,7 @@
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AIconAttribute_002Ecs_002Fl_003AC_0021_003FUsers_003F60527_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F021f30a9a92b48ce98ae6b39956dd76a1df600_003F6a_003F44c4467c_003FIconAttribute_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AIMGUIContainer_002Ecs_002Fl_003AC_0021_003FUsers_003F60527_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fb4f75f0eb2d14004826911645c6175d61fbe00_003F49_003F22dd7281_003FIMGUIContainer_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AKeyCode_002Ecs_002Fl_003AC_0021_003FUsers_003F60527_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F021f30a9a92b48ce98ae6b39956dd76a1df600_003Fd1_003F01a95d3a_003FKeyCode_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AList_00601_002Ecs_002Fl_003AC_0021_003FUsers_003Fbob_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F314938d17f3848e8ac683e11b27f62ee46ae00_003Fe8_003F01e5a04a_003FList_00601_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003APhysics_002Ecs_002Fl_003AC_0021_003FUsers_003F60527_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F03ef825315384b1cab81c4b53eb03d922ac00_003Fc6_003F12ad2f00_003FPhysics_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ARenderChain_002Ecs_002Fl_003AC_0021_003FUsers_003F60527_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fb4f75f0eb2d14004826911645c6175d61fbe00_003Fde_003Fedac53d9_003FRenderChain_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AResolution_002Ecs_002Fl_003AC_0021_003FUsers_003F60527_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F021f30a9a92b48ce98ae6b39956dd76a1df600_003F7f_003F84f3bf4d_003FResolution_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
|
||||
@@ -130,7 +130,7 @@ QualitySettings:
|
||||
globalTextureMipmapLimit: 0
|
||||
textureMipmapLimitSettings: []
|
||||
anisotropicTextures: 2
|
||||
antiAliasing: 8
|
||||
antiAliasing: 2
|
||||
softParticles: 0
|
||||
softVegetation: 1
|
||||
realtimeReflectionProbes: 1
|
||||
|
||||
@@ -6,37 +6,37 @@ EditorUserSettings:
|
||||
serializedVersion: 4
|
||||
m_ConfigSettings:
|
||||
GraphicsSettingsInspector_UserSettings:
|
||||
value: 18134705175a055722080a3115371d4a0d55006876786860616b0471b8b3676eacb72ba5a52a362c3c0ee63201181433fe3e101bf3250b06144ca74c24f1190708e016c213c61a52f91c12cac80fd8edd298e1e4d1fde2cacddeacbcc1fee7eef0e3b6faa69af9ceaeaaec81a6d2c2c8c8c4b2e5dfd5ccd3f8cf
|
||||
value: 18134705175a055722080a3115371d4a0d55006876786860616b0471b8b07a68ffab74f9ee2a3a30300cea1a11320d0beb1a0c25f7060f494b4cc80018eb09361fc211cb1f862d19c51d19dcc413d6ade0d8ddfcddf9f4d9d29195fcfde6ebeae6f0a9c9afa6f8c5b89ff7a1aacececac4eba4d7c9d28bda
|
||||
flags: 0
|
||||
RecentlyUsedSceneGuid-0:
|
||||
value: 57085255030d5d0e540c0e7340750f44174f4a2c2a7d70357b2c4b62bbb9353d
|
||||
value: 55545602010350590b0d5d20162708444f4e1e7e2a7d74602c2c4e6ab3b1306f
|
||||
flags: 0
|
||||
RecentlyUsedSceneGuid-1:
|
||||
value: 54530c0455535f0f585c0d2611740f44424f4e2f7a7d7133782c4e66b6e4623c
|
||||
value: 5b000052510d5b0a5b565a2344770b444e4e1d7c79797f622b7b1c35b3e2606a
|
||||
flags: 0
|
||||
RecentlyUsedSceneGuid-2:
|
||||
value: 0103000752530c0f5a085471152509444515482e7f712763792b4a64e0b7673e
|
||||
value: 5309000306505b0d0b565f20427a5e44104e1d2c2a7f7467287c4d64b0b66469
|
||||
flags: 0
|
||||
RecentlyUsedSceneGuid-3:
|
||||
value: 5052025f5d545a5a0e595b724276064444164029287870687f2a1f63b0b86c61
|
||||
value: 065006565505590b0b0f5e7240730f4046154a7a7c7876607f2b4f63b2b06468
|
||||
flags: 0
|
||||
RecentlyUsedSceneGuid-4:
|
||||
value: 5505015f5c515a085f5b092149760f441716407a787d7564287b1b36e7e1366e
|
||||
value: 5303020755510a0f5e085c2744775a40454e1a2f282b72632f284d61e1e5673d
|
||||
flags: 0
|
||||
RecentlyUsedSceneGuid-5:
|
||||
value: 020056535456585e0f0d0a7541210d441215482c2d297f36752c1b65b3b0376e
|
||||
value: 52530c5601535f020f565a2043770d1612154d2f747975692c7b4e66b5e3303b
|
||||
flags: 0
|
||||
RecentlyUsedSceneGuid-6:
|
||||
value: 5a05525f0707590c5f5f547116215a444e4e4c782e7b24677c2f4430b4e6673d
|
||||
value: 025002565403500e5b5b55724321064445161a7b7b7c22367a7e4467b4b76160
|
||||
flags: 0
|
||||
RecentlyUsedSceneGuid-7:
|
||||
value: 5b0056045c070d0c595a097b447b0b46174241737a7e76612c284d30e4e5643b
|
||||
value: 515250075c0c595e5f5a5e71122159444e4e4a2f7a7d7f602f284d66b4b76661
|
||||
flags: 0
|
||||
RecentlyUsedSceneGuid-8:
|
||||
value: 005250050156080d595f092116705b44434e482b787875692b281b31b1b5306f
|
||||
value: 05070d5f50535d5e0c0c5472427008444e4e1b2f7a7170622e784e37bab3636a
|
||||
flags: 0
|
||||
RecentlyUsedSceneGuid-9:
|
||||
value: 025005075d000f0c095c0f7145730b4447161e2c787923327a7c4965e0b66669
|
||||
value: 5505015f5c515a085f5b092149760f441716407a787d7564287b1b36e7e1366e
|
||||
flags: 0
|
||||
UnityEditor.ShaderGraph.Blackboard:
|
||||
value: 18135939215a0a5004000b0e15254b524c030a3f2964643d120d1230e9e93a3fd6e826abbd2e2d293c4ead313b08042de6030a0afa240c0d020be94c4ba75e435d8715fa32c70d15d11612dacc11fee5d3c5d1fe9ab1bf968e93e2ffcbc3e7e2f0b3ffe0e8b0be9afeffa9ffff8e85dd8390e2969e8899daa7
|
||||
@@ -50,9 +50,6 @@ EditorUserSettings:
|
||||
UnityEditor.ShaderGraph.ToggleSettings:
|
||||
value: 18135d1527590858060c032302276919051e1a26296a7c243f3c187fa0e92708f0e220e0e22d09352a0bed30017c5b2be01f0c47b40219221f1ded0b12eb1f0127cc0bcc18c41a5e910d0edbc85193e0dadadbf8e8f9e8ced7dba5e0b6aaaca4dbfeabfef4eae1
|
||||
flags: 0
|
||||
lightmappingBakingProfile:
|
||||
value: 51
|
||||
flags: 0
|
||||
vcSharedLogLevel:
|
||||
value: 0d5e400f0650
|
||||
flags: 0
|
||||
|
||||
Reference in New Issue
Block a user