Restored AntiAliasing settings

This commit is contained in:
katboi01
2024-12-13 00:20:05 +01:00
parent 8a1ab5dcb7
commit 58e3e5b1dd
9 changed files with 2419 additions and 2170 deletions
@@ -23,8 +23,9 @@ MonoBehaviour:
m_RequireOpaqueTexture: 1 m_RequireOpaqueTexture: 1
m_OpaqueDownsampling: 0 m_OpaqueDownsampling: 0
m_SupportsTerrainHoles: 0 m_SupportsTerrainHoles: 0
m_StoreActionsOptimization: 0
m_SupportsHDR: 0 m_SupportsHDR: 0
m_MSAA: 8 m_MSAA: 4
m_RenderScale: 1 m_RenderScale: 1
m_MainLightRenderingMode: 1 m_MainLightRenderingMode: 1
m_MainLightShadowsSupported: 1 m_MainLightShadowsSupported: 1
+2381 -2152
View File
File diff suppressed because it is too large Load Diff
+3 -2
View File
@@ -1,4 +1,5 @@
using UnityEngine; using TMPro;
using UnityEngine;
using UnityEngine.EventSystems; using UnityEngine.EventSystems;
using UnityEngine.UI; using UnityEngine.UI;
@@ -10,7 +11,7 @@ public class CameraOrbit : MonoBehaviour
[Header("Light")] [Header("Light")]
public GameObject Light; public GameObject Light;
public Dropdown CameraModeDropdown; public TMP_Dropdown CameraModeDropdown;
public GameObject CameraTargetHelper; public GameObject CameraTargetHelper;
public Vector3 TargetCenter; public Vector3 TargetCenter;
+9 -3
View File
@@ -21,9 +21,12 @@ public class Config
public string WorkModeTip = "Affects how application work, options: 0 - work with game client, 1 - work without game client(slow), Database needs to be updated manually"; public string WorkModeTip = "Affects how application work, options: 0 - work with game client, 1 - work without game client(slow), Database needs to be updated manually";
public WorkMode WorkMode = WorkMode.Default; public WorkMode WorkMode = WorkMode.Default;
public string VmdKeyReductionLevelTip = " Affects the recording quality: 1 = record every frame, 2 = record every two frames, and so on."; public string VmdKeyReductionLevelTip = "Affects the recording quality: 1 = record every frame, 2 = record every two frames, and so on.";
public int VmdKeyReductionLevel = 2; public int VmdKeyReductionLevel = 2;
public string AntiAliasingTip = "Display, screenshot antialiasing level. 0 - no AA, 1 - 2x MSAA, 2 - 4x MSAA, 3 - 8x MSAA";
public int AntiAliasing = 2;
public string VmdMorphConvertSettingTip = "The mapping of MMD mprphs to UMA mprphs during VMD recording, multiple UMA expression weights will be combined (not exceeding 1)"; public string VmdMorphConvertSettingTip = "The mapping of MMD mprphs to UMA mprphs during VMD recording, multiple UMA expression weights will be combined (not exceeding 1)";
public List<MorphConvertConfig> VmdMorphConvertSetting = new List<MorphConvertConfig> public List<MorphConvertConfig> VmdMorphConvertSetting = new List<MorphConvertConfig>
{ {
@@ -122,10 +125,13 @@ public class Config
Instance = this; Instance = this;
} }
public void UpdateConfig() public void UpdateConfig(bool requireRestart)
{ {
File.WriteAllText(configPath, JsonUtility.ToJson(this, true)); File.WriteAllText(configPath, JsonUtility.ToJson(this, true));
UmaViewerUI.Instance.ShowMessage("The configuration has changed. Please restart the application.", UIMessageType.Default); if (requireRestart)
{
UmaViewerUI.Instance.ShowMessage("The configuration has changed. Please restart the application.", UIMessageType.Default);
}
} }
} }
+2 -1
View File
@@ -114,7 +114,8 @@ public class Screenshot : MonoBehaviour
} }
var tex_color = new Texture2D(width, height, TextureFormat.ARGB32, false); var tex_color = new Texture2D(width, height, TextureFormat.ARGB32, false);
var render_texture = RenderTexture.GetTemporary(width, height, 24, RenderTextureFormat.ARGB32,RenderTextureReadWrite.Default,8); int aaLevel = QualitySettings.antiAliasing == 0? 1 : QualitySettings.antiAliasing; //RT uses '1' for no antialiasing
var render_texture = RenderTexture.GetTemporary(width, height, 24, RenderTextureFormat.ARGB32,RenderTextureReadWrite.Default, aaLevel);
var grab_area = new Rect(0, 0, width, height); var grab_area = new Rect(0, 0, width, height);
RenderTexture.active = render_texture; RenderTexture.active = render_texture;
-6
View File
@@ -220,12 +220,6 @@ public class UmaViewerMain : MonoBehaviour
Builder.ShaderList = new List<Shader>(shaders.LoadAllAssets<Shader>()); Builder.ShaderList = new List<Shader>(shaders.LoadAllAssets<Shader>());
} }
public void ChangeAA(int val)
{
}
public void OpenUrl(string url) public void OpenUrl(string url)
{ {
Application.OpenURL(url); Application.OpenURL(url);
+20 -3
View File
@@ -120,6 +120,7 @@ public class UmaViewerUI : MonoBehaviour
public Button UpdateDBButton; public Button UpdateDBButton;
public TMP_Dropdown WorkModeDropdown; public TMP_Dropdown WorkModeDropdown;
public TMP_Dropdown LanguageDropdown; public TMP_Dropdown LanguageDropdown;
public TMP_Dropdown AntialiasingDropdown;
public List<GameObject> TogglablePanels = new List<GameObject>(); public List<GameObject> TogglablePanels = new List<GameObject>();
public List<GameObject> TogglableFacials = new List<GameObject>(); public List<GameObject> TogglableFacials = new List<GameObject>();
@@ -167,6 +168,8 @@ public class UmaViewerUI : MonoBehaviour
{ {
WorkModeDropdown.SetValueWithoutNotify((int)Config.Instance.WorkMode); WorkModeDropdown.SetValueWithoutNotify((int)Config.Instance.WorkMode);
LanguageDropdown.SetValueWithoutNotify((int)Config.Instance.Language); LanguageDropdown.SetValueWithoutNotify((int)Config.Instance.Language);
AntialiasingDropdown.SetValueWithoutNotify(Config.Instance.AntiAliasing);
ChangeAntiAliasing(Config.Instance.AntiAliasing);
UpdateDBButton.interactable = (Config.Instance.WorkMode == WorkMode.Standalone); UpdateDBButton.interactable = (Config.Instance.WorkMode == WorkMode.Standalone);
LoadedAssetsClear(); LoadedAssetsClear();
UmaAssetManager.OnLoadedBundleUpdate += LoadedAssetsAdd; UmaAssetManager.OnLoadedBundleUpdate += LoadedAssetsAdd;
@@ -1386,7 +1389,21 @@ public class UmaViewerUI : MonoBehaviour
if ((int)Config.Instance.Language != lang) if ((int)Config.Instance.Language != lang)
{ {
Config.Instance.Language = (Language)lang; Config.Instance.Language = (Language)lang;
Config.Instance.UpdateConfig(); Config.Instance.UpdateConfig(true);
}
}
/// <summary> Converts values 1-4 to valid AA values </summary>
public void ChangeAntiAliasing(int value)
{
int[] aaValues = { 0, 2, 4, 8 };
QualitySettings.antiAliasing = aaValues[value];
if (Config.Instance.AntiAliasing != value)
{
Config.Instance.AntiAliasing = value;
Config.Instance.UpdateConfig(false);
} }
} }
@@ -1395,7 +1412,7 @@ public class UmaViewerUI : MonoBehaviour
if ((int)Config.Instance.WorkMode != mode) if ((int)Config.Instance.WorkMode != mode)
{ {
Config.Instance.WorkMode = (WorkMode)mode; Config.Instance.WorkMode = (WorkMode)mode;
Config.Instance.UpdateConfig(); Config.Instance.UpdateConfig(true);
} }
} }
@@ -1408,7 +1425,7 @@ public class UmaViewerUI : MonoBehaviour
if (path[0] != Config.Instance.MainPath) if (path[0] != Config.Instance.MainPath)
{ {
Config.Instance.MainPath = path[0]; Config.Instance.MainPath = path[0];
Config.Instance.UpdateConfig(); Config.Instance.UpdateConfig(true);
} }
} }
#endif #endif
+1 -1
View File
@@ -134,7 +134,7 @@ PlayerSettings:
16:10: 1 16:10: 1
16:9: 1 16:9: 1
Others: 1 Others: 1
bundleVersion: 2.1.19 bundleVersion: 2.1.20
preloadedAssets: [] preloadedAssets: []
metroInputSource: 0 metroInputSource: 0
wsaTransparentSwapchain: 0 wsaTransparentSwapchain: 0
+1 -1
View File
@@ -206,7 +206,7 @@ QualitySettings:
skinWeights: 4 skinWeights: 4
textureQuality: 0 textureQuality: 0
anisotropicTextures: 2 anisotropicTextures: 2
antiAliasing: 8 antiAliasing: 4
softParticles: 0 softParticles: 0
softVegetation: 1 softVegetation: 1
realtimeReflectionProbes: 1 realtimeReflectionProbes: 1