diff --git a/Assets/Plugins/Windows/GfxPluginNativeRender.dll b/Assets/Plugins/Windows/GfxPluginNativeRender.dll index b4d75f2..ee2ce4c 100644 Binary files a/Assets/Plugins/Windows/GfxPluginNativeRender.dll and b/Assets/Plugins/Windows/GfxPluginNativeRender.dll differ diff --git a/Assets/Scenes/Terminal/Art/VFX/Materials/HologramGarden_Mat.mat b/Assets/Scenes/Terminal/Art/VFX/Materials/HologramGarden_Mat.mat index c9c630c..50b440d 100644 --- a/Assets/Scenes/Terminal/Art/VFX/Materials/HologramGarden_Mat.mat +++ b/Assets/Scenes/Terminal/Art/VFX/Materials/HologramGarden_Mat.mat @@ -35,7 +35,11 @@ Material: m_LockedProperties: m_SavedProperties: serializedVersion: 3 - m_TexEnvs: [] + m_TexEnvs: + - _SampleTexture2D_08b30b3f114b48d5ba8da4c2c4be251f_Texture_1_Texture2D: + m_Texture: {fileID: 2800000, guid: 5e7fc1923ebc88745bbc44d5a9570124, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} m_Ints: [] m_Floats: - _Push: 1.16 diff --git a/Assets/Scenes/Terminal/Art/VFX/Materials/HologramOasis_Mat.mat b/Assets/Scenes/Terminal/Art/VFX/Materials/HologramOasis_Mat.mat index a33eca1..c8939fb 100644 --- a/Assets/Scenes/Terminal/Art/VFX/Materials/HologramOasis_Mat.mat +++ b/Assets/Scenes/Terminal/Art/VFX/Materials/HologramOasis_Mat.mat @@ -35,7 +35,11 @@ Material: m_LockedProperties: m_SavedProperties: serializedVersion: 3 - m_TexEnvs: [] + m_TexEnvs: + - _SampleTexture2D_08b30b3f114b48d5ba8da4c2c4be251f_Texture_1_Texture2D: + m_Texture: {fileID: 2800000, guid: 5e7fc1923ebc88745bbc44d5a9570124, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} m_Ints: [] m_Floats: - _QueueControl: 0 diff --git a/Assets/Settings/Mobile/Mobile_High.asset b/Assets/Settings/Mobile/Mobile_High.asset index b1a6030..0c31499 100644 --- a/Assets/Settings/Mobile/Mobile_High.asset +++ b/Assets/Settings/Mobile/Mobile_High.asset @@ -28,7 +28,7 @@ MonoBehaviour: m_SupportsHDR: 1 m_HDRColorBufferPrecision: 0 m_MSAA: 1 - m_RenderScale: 0.75 + m_RenderScale: 0.5882813 m_UpscalingFilter: 0 m_FsrOverrideSharpness: 1 m_FsrSharpness: 1 @@ -115,5 +115,4 @@ MonoBehaviour: m_ShaderVariantLogLevel: 0 m_ShadowCascades: 0 superResolution: 14 - sSRenderScale: 3 vrsRate: 0 diff --git a/Assets/Settings/Mobile/Mobile_High_Renderer.asset b/Assets/Settings/Mobile/Mobile_High_Renderer.asset index 396e5a4..0382291 100644 --- a/Assets/Settings/Mobile/Mobile_High_Renderer.asset +++ b/Assets/Settings/Mobile/Mobile_High_Renderer.asset @@ -145,10 +145,10 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: c3c4391133b9f3142b57264047029ec5, type: 3} m_Name: XESS m_EditorClassIdentifier: - m_Active: 0 + m_Active: 1 xess1ConfigParam: - OutputWidth: 1920 - OutputHeight: 1080 + OutputWidth: 2560 + OutputHeight: 1440 Quality: 103 UseHiResMotionVectors: 0 UseJitteredMotionVectors: 0 @@ -157,12 +157,13 @@ MonoBehaviour: UseResponsiveMask: 0 UseAutoExposure: 0 EnableProfiling: 0 + InvertedDepth: 0 VelocityScaleX: -2 VelocityScaleY: 2 - JitterScaleX: 1 - JitterScaleY: 1 + JitterScaleX: 0 + JitterScaleY: 0 ExposureScale: 1 - MipMapBias: -1.91 + MipMapBias: -1.45 --- !u!114 &1524480044783497712 MonoBehaviour: m_ObjectHideFlags: 0 @@ -175,11 +176,12 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: a6b8ba513f1b1fe499924f362fdde22d, type: 3} m_Name: GSR m_EditorClassIdentifier: - m_Active: 1 + m_Active: 0 + quality: 4 v1settings: EnableEdgeDirection: 1 Mode: 1 - Sharp: 2 + Sharp: 0.666 GSRV1Material: {fileID: 2100000, guid: d57e64d5723127243b429034bed82c7d, type: 2} v2settings: UseCompute2Pass: 0 diff --git a/NativeRenderPlugin/RenderAPI.h b/NativeRenderPlugin/RenderAPI.h index f14727a..0506c7c 100644 --- a/NativeRenderPlugin/RenderAPI.h +++ b/NativeRenderPlugin/RenderAPI.h @@ -97,6 +97,7 @@ public: virtual void configXESS1(void* data) {} virtual void disableXESS1() {} + virtual bool getInputResolution(uint32_t outw, uint32_t outh, int quality, uint32_t& width, uint32_t& height) { return false; } protected: virtual void initSupportFeature() = 0; diff --git a/NativeRenderPlugin/RenderAPI_D3D12.cpp b/NativeRenderPlugin/RenderAPI_D3D12.cpp index 159a210..f03de76 100644 --- a/NativeRenderPlugin/RenderAPI_D3D12.cpp +++ b/NativeRenderPlugin/RenderAPI_D3D12.cpp @@ -104,13 +104,19 @@ public: virtual void disableXESS1() override; virtual void configXESS1(void* data) override; + virtual bool getInputResolution(uint32_t outw, uint32_t outh, int quality, uint32_t& width, uint32_t& height) override; + + IUnityGraphicsD3D12v7* s_d3d12; XessV13* xess; + static RenderAPI_D3D12* instance; }; +RenderAPI_D3D12* RenderAPI_D3D12::instance = nullptr; RenderAPI* CreateRenderAPI_D3D12() { - return new RenderAPI_D3D12(); + RenderAPI_D3D12::instance = new RenderAPI_D3D12(); + return RenderAPI_D3D12::instance; } @@ -126,7 +132,6 @@ UINT64 CalcByteAlignedValue(unsigned int byteSize, unsigned int byteAlignment) } - void RenderAPI_D3D12::processDeviceEvent(UnityGfxDeviceEventType type, IUnityInterfaces* interfaces) { switch (type) @@ -282,6 +287,11 @@ void RenderAPI_D3D12::configXESS1(void* data) xess->configxess(data); } -#undef ReturnOnFail +bool RenderAPI_D3D12::getInputResolution(uint32_t outw, uint32_t outh, int quality, uint32_t& width, uint32_t& height) +{ + return xess->get_input_resolution(outw, outh, quality, width, height); +} + +#undef ReturnOnFail #endif // #if SUPPORT_D3D12 diff --git a/NativeRenderPlugin/RenderAPI_Vulkan.cpp b/NativeRenderPlugin/RenderAPI_Vulkan.cpp index e306140..d8f549d 100644 --- a/NativeRenderPlugin/RenderAPI_Vulkan.cpp +++ b/NativeRenderPlugin/RenderAPI_Vulkan.cpp @@ -551,5 +551,4 @@ void RenderAPI_Vulkan::postFGExtrapolation() void RenderAPI_Vulkan::disableFGExtrapolation() { } - #endif // #if SUPPORT_VULKAN diff --git a/NativeRenderPlugin/RenderingPlugin.cpp b/NativeRenderPlugin/RenderingPlugin.cpp index a21a769..a879d06 100644 --- a/NativeRenderPlugin/RenderingPlugin.cpp +++ b/NativeRenderPlugin/RenderingPlugin.cpp @@ -192,6 +192,11 @@ extern "C" UNITY_INTERFACE_EXPORT bool GetFeatureSupport(int feature) return s_current_api->getFeatureSupport((GraphicsFeature)feature); } +extern "C" UNITY_INTERFACE_EXPORT bool GetInputResolution(uint32_t outw, uint32_t outh, int quality, uint32_t& width, uint32_t& height) +{ + return s_current_api->getInputResolution(outw, outh, quality, width, height); +} + // -------------------------------------------------------------------------- // DX12 plugin specific // -------------------------------------------------------------------------- diff --git a/NativeRenderPlugin/features/xess1/xess.cpp b/NativeRenderPlugin/features/xess1/xess.cpp index 5c3c036..510376a 100644 --- a/NativeRenderPlugin/features/xess1/xess.cpp +++ b/NativeRenderPlugin/features/xess1/xess.cpp @@ -258,7 +258,7 @@ void XessV13::execute(void* data, ID3D12GraphicsCommandList* cmd_list) } } -bool XessV13::get_input_resolution(uint32_t outw, uint32_t outh, int quality,uint32_t& Width, uint32_t& Height) +bool XessV13::get_input_resolution(uint32_t outw, uint32_t outh, int quality,uint32_t& width, uint32_t& height) { xess_2d_t inputRes = { 1, 1 }; xess_2d_t outputRes = { outw, outh }; @@ -270,8 +270,8 @@ bool XessV13::get_input_resolution(uint32_t outw, uint32_t outh, int quality,uin return false; } - Width = inputRes.x; - Height = inputRes.y; + width = inputRes.x; + height = inputRes.y; return true; } diff --git a/NativeRenderPlugin/features/xess1/xess.h b/NativeRenderPlugin/features/xess1/xess.h index d19698d..a73e07f 100644 --- a/NativeRenderPlugin/features/xess1/xess.h +++ b/NativeRenderPlugin/features/xess1/xess.h @@ -27,7 +27,7 @@ struct XessV13 final void execute(void* data, ID3D12GraphicsCommandList* cmd_list); - bool get_input_resolution(uint32_t outw, uint32_t outh, int quality, uint32_t& Width, uint32_t& Height); + bool get_input_resolution(uint32_t outw, uint32_t outh, int quality, uint32_t& Width, uint32_t& Height); private: ID3D12Device* device; diff --git a/Packages/com.unity.render-pipelines.universal@14.0.11/Editor/Unity.RenderPipelines.Universal.Editor.asmdef b/Packages/com.unity.render-pipelines.universal@14.0.11/Editor/Unity.RenderPipelines.Universal.Editor.asmdef index 10bb6c8..a058684 100644 --- a/Packages/com.unity.render-pipelines.universal@14.0.11/Editor/Unity.RenderPipelines.Universal.Editor.asmdef +++ b/Packages/com.unity.render-pipelines.universal@14.0.11/Editor/Unity.RenderPipelines.Universal.Editor.asmdef @@ -3,17 +3,11 @@ "rootNamespace": "", "references": [ "GUID:15fc0a57446b3144c949da3e2b9737a9", - "GUID:d60799ab2a985554ea1a39cd38695018", - "GUID:a35efad8797223d499f8c68b1f545dbc", "GUID:df380645f10b7bc4b97d4f5eb6303d95", "GUID:3eae0364be2026648bf74846acb8a731", "GUID:be0903cd8e1546f498710afdc59db5eb", "GUID:b75d3cd3037d383a8d1e2f9a26d73d8a", - "GUID:329b4ccd385744985bf3f83cfd77dfe7", - "GUID:9604b18aafdbc9346bceb5e19ac9c746", - "GUID:f9fe0089ec81f4079af78eb2287a6163", - "GUID:116a4d4dbf5c04973bbf517077a062a1", - "GUID:e40ba710768534012815d3193fa296cb" + "GUID:329b4ccd385744985bf3f83cfd77dfe7" ], "includePlatforms": [ "Editor" @@ -44,6 +38,11 @@ "name": "com.unity.visualeffectgraph", "expression": "1.0.0", "define": "HAS_VFX_GRAPH" + }, + { + "name": "com.unity.modules.nvidia", + "expression": "1.0.0", + "define": "ENABLE_NVIDIA_MODULE" } ], "noEngineReferences": false diff --git a/Packages/com.unity.render-pipelines.universal@14.0.11/Editor/UniversalRenderPipelineAssetEditor.cs b/Packages/com.unity.render-pipelines.universal@14.0.11/Editor/UniversalRenderPipelineAssetEditor.cs index 37289c9..00cea26 100644 --- a/Packages/com.unity.render-pipelines.universal@14.0.11/Editor/UniversalRenderPipelineAssetEditor.cs +++ b/Packages/com.unity.render-pipelines.universal@14.0.11/Editor/UniversalRenderPipelineAssetEditor.cs @@ -21,7 +21,6 @@ namespace UnityEditor.Rendering.Universal private SerializedUniversalRenderPipelineAsset m_SerializedURPAsset; private SerializedProperty superResolution; - private SerializedProperty ssRenderScale; private SerializedProperty vrsRate; /// public override void OnInspectorGUI() @@ -29,7 +28,6 @@ namespace UnityEditor.Rendering.Universal m_SerializedURPAsset.Update(); UniversalRenderPipelineAssetUI.Inspector.Draw(m_SerializedURPAsset, this); EditorGUILayout.PropertyField(superResolution, new GUIContent("超分")); - EditorGUILayout.PropertyField(ssRenderScale, new GUIContent("超分比例")); EditorGUILayout.PropertyField(vrsRate, new GUIContent("VRS Rate")); m_SerializedURPAsset.Apply(); } @@ -38,7 +36,6 @@ namespace UnityEditor.Rendering.Universal { m_SerializedURPAsset = new SerializedUniversalRenderPipelineAsset(serializedObject); superResolution = serializedObject.FindProperty("superResolution"); - ssRenderScale = serializedObject.FindProperty("sSRenderScale"); vrsRate = serializedObject.FindProperty("vrsRate"); CreateRendererReorderableList(); } diff --git a/Packages/com.unity.render-pipelines.universal@14.0.11/Runtime/Passes/PostProcessPass.cs b/Packages/com.unity.render-pipelines.universal@14.0.11/Runtime/Passes/PostProcessPass.cs index 0a14a39..dcf1442 100644 --- a/Packages/com.unity.render-pipelines.universal@14.0.11/Runtime/Passes/PostProcessPass.cs +++ b/Packages/com.unity.render-pipelines.universal@14.0.11/Runtime/Passes/PostProcessPass.cs @@ -521,7 +521,7 @@ namespace UnityEngine.Rendering.Universal { if (c is ISuperResolutionFeature isr) { - isr.DoSR(cmd, source, dst, m_MotionVectors, ref renderingData); + isr.DoSR(cmd, source, dst, m_MotionVectors, ref renderingData); } } } diff --git a/Packages/com.unity.render-pipelines.universal@14.0.11/Runtime/ScriptableRenderer.cs b/Packages/com.unity.render-pipelines.universal@14.0.11/Runtime/ScriptableRenderer.cs index 4de6e9e..967c709 100644 --- a/Packages/com.unity.render-pipelines.universal@14.0.11/Runtime/ScriptableRenderer.cs +++ b/Packages/com.unity.render-pipelines.universal@14.0.11/Runtime/ScriptableRenderer.cs @@ -6,6 +6,7 @@ using UnityEditor; using UnityEngine.Experimental.Rendering; using UnityEngine.Experimental.Rendering.RenderGraphModule; using UnityEngine.Profiling; +using X.Rendering.Feature; namespace UnityEngine.Rendering.Universal { @@ -273,7 +274,9 @@ namespace UnityEngine.Rendering.Universal // We clamp this value to 0.0 or less to make sure we don't end up reducing image detail in the downsampling case. float mipBias = Math.Min((float)-Math.Log(cameraWidth / scaledCameraWidth, 2.0f), 0.0f); // Temporal Anti-aliasing can use negative mip bias to increase texture sharpness and new information for the jitter. - float taaMipBias = Math.Min(cameraData.taaSettings.mipBias, 0.0f); + float ssMipBias = 0; + SuperResolutionParamSets.Instance.Get("MipmapBias", ref ssMipBias); + float taaMipBias = Math.Min(cameraData.taaSettings.mipBias, ssMipBias); mipBias = Math.Min(mipBias, taaMipBias); // TODO: xyang Mip bias cmd.SetGlobalVector(ShaderPropertyId.globalMipBias, new Vector2(mipBias, Mathf.Pow(2.0f, mipBias))); diff --git a/Packages/com.unity.render-pipelines.universal@14.0.11/Runtime/SuperRendering/NatvieHelper/RenderingPlugin.cs b/Packages/com.unity.render-pipelines.universal@14.0.11/Runtime/SuperRendering/NatvieHelper/RenderingPlugin.cs index 8f28c87..a2f9dad 100644 --- a/Packages/com.unity.render-pipelines.universal@14.0.11/Runtime/SuperRendering/NatvieHelper/RenderingPlugin.cs +++ b/Packages/com.unity.render-pipelines.universal@14.0.11/Runtime/SuperRendering/NatvieHelper/RenderingPlugin.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.Runtime.InteropServices; +using UnityEngine; namespace X.Rendering.Feature { @@ -27,12 +28,19 @@ namespace X.Rendering.Feature #endif private static extern bool GetFeatureSupport(int feature); -//#if (PLATFORM_IOS || PLATFORM_TVOS || PLATFORM_BRATWURST || PLATFORM_SWITCH) && !UNITY_EDITOR -// [DllImport("__Internal")] -//#else -// [DllImport("GfxPluginNativeRender")] -//#endif -// public static extern bool DoFGExtrapolation(IntPtr src, IntPtr data, IntPtr dst); +#if (PLATFORM_IOS || PLATFORM_TVOS || PLATFORM_BRATWURST || PLATFORM_SWITCH) && !UNITY_EDITOR + [DllImport("__Internal")] +#else + [DllImport("GfxPluginNativeRender")] +#endif + public static extern bool GetInputResolution(int outw, int outh, int quality,ref int width, ref int height); + + //#if (PLATFORM_IOS || PLATFORM_TVOS || PLATFORM_BRATWURST || PLATFORM_SWITCH) && !UNITY_EDITOR + // [DllImport("__Internal")] + //#else + // [DllImport("GfxPluginNativeRender")] + //#endif + // public static extern bool DoFGExtrapolation(IntPtr src, IntPtr data, IntPtr dst); public enum NativeRenderingEvent { diff --git a/Packages/com.unity.render-pipelines.universal@14.0.11/Runtime/SuperRendering/SF/FG.cs b/Packages/com.unity.render-pipelines.universal@14.0.11/Runtime/SuperRendering/SF/FG.cs index b821488..e94919d 100644 --- a/Packages/com.unity.render-pipelines.universal@14.0.11/Runtime/SuperRendering/SF/FG.cs +++ b/Packages/com.unity.render-pipelines.universal@14.0.11/Runtime/SuperRendering/SF/FG.cs @@ -45,7 +45,8 @@ namespace X.Rendering.Feature p->src = history1.rt.GetNativeTexturePtr(); p->data = history2.rt.GetNativeTexturePtr(); p->dst = dst.rt.GetNativeTexturePtr(); - cmd.IssuePluginEventAndData(RenderingPlugin.GetRenderEventAndDataFunc(), (int)RenderingPlugin.NativeRenderingEvent.DoFGExtrapolation, data); + cmd.IssuePluginEventAndData(RenderingPlugin.GetRenderEventAndDataFunc(), (int)RenderingPlugin.NativeRenderingEvent. + , data); context.ExecuteCommandBuffer(cmd); cmd.Clear(); presented = true; diff --git a/Packages/com.unity.render-pipelines.universal@14.0.11/Runtime/SuperRendering/SR/Scripts/GSR.cs b/Packages/com.unity.render-pipelines.universal@14.0.11/Runtime/SuperRendering/SR/Scripts/GSR.cs index b6b5e22..e96ac7b 100644 --- a/Packages/com.unity.render-pipelines.universal@14.0.11/Runtime/SuperRendering/SR/Scripts/GSR.cs +++ b/Packages/com.unity.render-pipelines.universal@14.0.11/Runtime/SuperRendering/SR/Scripts/GSR.cs @@ -7,12 +7,24 @@ using UnityEngine.Rendering.Universal; namespace X.Rendering.Feature { + public enum GsrQuality + { + None, + NativeAA = 1, + UltraQuality, + Quality, + Balanced, + Performance, + UltraPerformance, + } + /// /// 高通 Snapdragon Game Super Resolution. /// api 无关,可能在 /// public sealed class GSR : ScriptableRendererFeature, ISuperResolutionFeature { + public GsrQuality quality; [SerializeField] private V1Setting v1settings; [SerializeField] @@ -22,6 +34,7 @@ namespace X.Rendering.Feature GSRV1 gsr1; GSRV2 gsr2; bool useGSR1 = true; + GsrQuality lastQuality = GsrQuality.None; public override void AddRenderPasses(ScriptableRenderer renderer, ref RenderingData renderingData) { @@ -43,6 +56,11 @@ namespace X.Rendering.Feature public void DoSR(CommandBuffer cmd, RTHandle source, RTHandle destination, RTHandle motionVector, ref RenderingData renderingData) { + if (lastQuality != quality) + { + UniversalRenderPipeline.asset.renderScale = GetRenderScale(); + lastQuality = quality; + } if (useGSR1) { gsr1.DoSR(cmd, source, destination, ref renderingData); @@ -53,6 +71,28 @@ namespace X.Rendering.Feature } } + public float GetRenderScale() + { + switch (quality) + { + case GsrQuality.None: + case GsrQuality.NativeAA: + return 1.0f; + case GsrQuality.UltraQuality: + return 1 / 1.2f; + case GsrQuality.Quality: + return 1 / 1.5f; + case GsrQuality.Balanced: + return 1 / 1.7f; + case GsrQuality.Performance: + return 1 / 2.0f; + case GsrQuality.UltraPerformance: + return 1 / 3.0f; + default: + throw new ArgumentOutOfRangeException(nameof(GsrQuality)); + } + } + public void SetSR(ESuperResolution resolution) { switch (resolution) @@ -173,7 +213,7 @@ namespace X.Rendering.Feature private static Matrix4x4 prevViewProjMatrix; private static int cameraStillFrameCnt; private ProfilingSampler profiler; - + public static readonly Vector2[] JitterPositions = new Vector2[32]; private static int jitterIndex; @@ -228,7 +268,7 @@ namespace X.Rendering.Feature cmdBuffer.SetGlobalFloat("_cameraFovAngleHor", cameraFovAngleHor); cmdBuffer.SetGlobalFloat("minLerpContribution", minLerpContribution); cmdBuffer.SetGlobalInt("sameCameraFrmNum", sameCameraFrmNum); - + cmdBuffer.SetRenderTarget(destination, loadAction: RenderBufferLoadAction.DontCare, storeAction: RenderBufferStoreAction.Store); cmdBuffer.DrawProcedural(Matrix4x4.identity, v2settings.GSRV2Material, 1, MeshTopology.Triangles, 3); @@ -237,7 +277,7 @@ namespace X.Rendering.Feature private void DispatchConvert(CommandBuffer cmdBuffer, RTHandle source, RTHandle motionVector, ref RenderingData renderingData) { - var gsrv2 =v2settings.GSRV2ComputeShader; + var gsrv2 = v2settings.GSRV2ComputeShader; cmdBuffer.SetComputeTextureParam(gsrv2, 0, "InputDepth", renderingData.cameraData.renderer.cameraDepthTargetHandle); cmdBuffer.SetComputeTextureParam(gsrv2, 0, "InputVelocity", motionVector); cmdBuffer.SetComputeTextureParam(gsrv2, 0, "InputColor", source); @@ -254,7 +294,7 @@ namespace X.Rendering.Feature private void DispatchUpscale(CommandBuffer cmdBuffer, RTHandle historyIn, RTHandle historyOut, RTHandle destination) { - var gsrv2 =v2settings.GSRV2ComputeShader; + var gsrv2 = v2settings.GSRV2ComputeShader; cmdBuffer.SetComputeTextureParam(gsrv2, 1, "_inputPrevHistoryOutput", historyIn); cmdBuffer.SetComputeTextureParam(gsrv2, 1, "_inputYCoCgColor", YCoCgColor); cmdBuffer.SetComputeTextureParam(gsrv2, 1, "_inputMotionDepthClipAlphaBuffer", motionDepthClipAlphaBuffer); @@ -292,7 +332,7 @@ namespace X.Rendering.Feature var clip2View = camera.projectionMatrix.inverse; var vcenter = clip2View.MultiplyPoint(Vector3.zero).normalized; var vright = clip2View.MultiplyPoint(new Vector3(0, 1, 0)).normalized; - var fv = math.acos(vcenter.x * vright.x + vcenter.y * vright.y + vcenter.z * vright.z); + var fv = math.acos(vcenter.x * vright.x + vcenter.y * vright.y + vcenter.z * vright.z); cameraFovAngleHor = math.tan(fv) * (float)(source.referenceSize.x) / (float)(source.referenceSize.y); var viewMatrix = camera.worldToCameraMatrix; var projMatrix = camera.projectionMatrix; @@ -352,7 +392,7 @@ namespace X.Rendering.Feature dimension = TextureDimension.Tex2D, msaaSamples = 1 }); - + DispatchConvert(cmd, source, motionVector, ref renderingData); if (jitterIndex % 2 == 0) { diff --git a/Packages/com.unity.render-pipelines.universal@14.0.11/Runtime/SuperRendering/SR/Scripts/SR.cs b/Packages/com.unity.render-pipelines.universal@14.0.11/Runtime/SuperRendering/SR/Scripts/SR.cs index 5cad6e7..8c8d19e 100644 --- a/Packages/com.unity.render-pipelines.universal@14.0.11/Runtime/SuperRendering/SR/Scripts/SR.cs +++ b/Packages/com.unity.render-pipelines.universal@14.0.11/Runtime/SuperRendering/SR/Scripts/SR.cs @@ -1,4 +1,5 @@ using System; +using System.Collections.Generic; using System.Runtime.InteropServices; using UnityEngine; using UnityEngine.Rendering; @@ -29,20 +30,77 @@ namespace X.Rendering.Feature XESS13, } - public enum ERenderScale + public class SuperResolutionParamSets { - [InspectorName("Native")] - Factor1, - [InspectorName("0.9x")] - Factor09, - [InspectorName("0.8x")] - Factor08, - [InspectorName("0.75x")] - Factor075, - [InspectorName("0.6x")] - Factor06, - [InspectorName("0.5x")] - Factor05, + private static SuperResolutionParamSets instance; + public static SuperResolutionParamSets Instance + { + get + { + if (instance == null) + { + instance = new(); + } + return instance; + } + } + + + Dictionary intMap = new (); + Dictionary floatMap = new (); + Dictionary stringMap = new (); + + public void Get(string name, ref T value) + { + switch (value) + { + case int v: + { + var map = intMap as Dictionary; + map.TryGetValue(name, out value); + break; + } + case float v: + { + var map = floatMap as Dictionary; + map.TryGetValue(name, out value); + break; + } + case string v: + { + var map = stringMap as Dictionary; + map.TryGetValue(name, out value); + break; + } + default: + throw new ArgumentException($"type err:{typeof(T)}"); + } + } + + + public void Set(string name, in T value) + { + switch (value) + { + case int v: + { + intMap[name] = v; + break; + } + case float v: + { + floatMap[name] = v; + break; + } + case string v: + { + stringMap[name] = v; + break; + } + default: + throw new ArgumentException($"type err:{typeof(T)}"); + } + } } [StructLayout(LayoutKind.Sequential)] @@ -58,5 +116,7 @@ namespace X.Rendering.Feature public void SetSR(ESuperResolution resolution); public void DoSR(CommandBuffer cmd, RTHandle source, RTHandle destination, RTHandle motionVector, ref RenderingData renderingData); + + public float GetRenderScale(); } } diff --git a/Packages/com.unity.render-pipelines.universal@14.0.11/Runtime/SuperRendering/SR/Scripts/XESS.cs b/Packages/com.unity.render-pipelines.universal@14.0.11/Runtime/SuperRendering/SR/Scripts/XESS.cs index b8b97a9..147486b 100644 --- a/Packages/com.unity.render-pipelines.universal@14.0.11/Runtime/SuperRendering/SR/Scripts/XESS.cs +++ b/Packages/com.unity.render-pipelines.universal@14.0.11/Runtime/SuperRendering/SR/Scripts/XESS.cs @@ -1,5 +1,6 @@ using System; using System.Runtime.InteropServices; +using UnityEditor.VersionControl; using UnityEngine; using UnityEngine.Rendering; using UnityEngine.Rendering.Universal; @@ -77,6 +78,7 @@ namespace X.Rendering.Feature IntPtr xess1ExecParamPtr; IntPtr xess1ConfigParamPtr; private ProfilingSampler profiler; + XessQuality lastQuality; public override void AddRenderPasses(ScriptableRenderer renderer, ref RenderingData renderingData) { @@ -97,45 +99,14 @@ namespace X.Rendering.Feature Marshal.FreeHGlobal(xess1ConfigParamPtr); } - static internal Matrix4x4 CalculateJitterMatrix(ref CameraData cameraData, out Vector2 jitter) - { - Matrix4x4 jitterMat = Matrix4x4.identity; - - jitter = Vector2.zero; - { - int taaFrameIndex = Time.frameCount; - - float actualWidth = cameraData.cameraTargetDescriptor.width; - float actualHeight = cameraData.cameraTargetDescriptor.height; - float jitterScale = cameraData.taaSettings.jitterScale; - - jitter = CalculateJitter(taaFrameIndex) * jitterScale; - - float offsetX = jitter.x * (2.0f / actualWidth); - float offsetY = jitter.y * (2.0f / actualHeight); - - jitterMat = Matrix4x4.Translate(new Vector3(offsetX, offsetY, 0.0f)); - } - - return jitterMat; - } - - static internal Vector2 CalculateJitter(int frameIndex) - { - // The variance between 0 and the actual halton sequence values reveals noticeable - // instability in Unity's shadow maps, so we avoid index 0. - float jitterX = HaltonSequence.Get((frameIndex & 1023) + 1, 2) - 0.5f; - float jitterY = HaltonSequence.Get((frameIndex & 1023) + 1, 3) - 0.5f; - - return new Vector2(jitterX, jitterY); - } - - public void DoSR(CommandBuffer cmd, RTHandle source, RTHandle destination, RTHandle motionVector, ref RenderingData renderingData) { using var scp = new ProfilingScope(cmd, profiler); Xess1ExecParam* xessexecPtr = (Xess1ExecParam*) xess1ExecParamPtr.ToPointer(); xessexecPtr->ResetHistory = false; + + var cameraData = renderingData.cameraData; + var camera = cameraData.camera; if (needTurnOnXess) { needTurnOnXess = false; @@ -144,8 +115,8 @@ namespace X.Rendering.Feature xesscfgPtr->ExposureScale = xess1ConfigParam.ExposureScale; xesscfgPtr->JitterScaleX = xess1ConfigParam.JitterScaleX; xesscfgPtr->JitterScaleY = xess1ConfigParam.JitterScaleY; - xesscfgPtr->OutputHeight = xess1ConfigParam.OutputHeight; - xesscfgPtr->OutputWidth = xess1ConfigParam.OutputWidth; + xesscfgPtr->OutputHeight = xess1ConfigParam.OutputHeight = camera.pixelHeight; + xesscfgPtr->OutputWidth = xess1ConfigParam.OutputWidth = camera.pixelWidth; xesscfgPtr->Quality = xess1ConfigParam.Quality; xesscfgPtr->UseAutoExposure = xess1ConfigParam.UseAutoExposure; xesscfgPtr->UseHiResMotionVectors = xess1ConfigParam.UseHiResMotionVectors; @@ -160,19 +131,34 @@ namespace X.Rendering.Feature cmd.IssuePluginEventAndData(RenderingPlugin.GetRenderEventAndDataFunc(), (int)RenderingPlugin.NativeRenderingEvent.EnableXESS1, IntPtr.Zero); cmd.IssuePluginEventAndData(RenderingPlugin.GetRenderEventAndDataFunc(), (int)RenderingPlugin.NativeRenderingEvent.UpdateXESS1Config, xess1ConfigParamPtr); xessexecPtr->ResetHistory = true; + //int w = 0, h = 0; + //// XXX: xess need context + //RenderingPlugin.GetInputResolution(camera.pixelWidth, camera.pixelHeight, (int)xess1ConfigParam.Quality, ref w, ref h); + //var renderScale = (float)w / camera.pixelWidth; + //Debug.Log($"GetInputResolution:{w},{h} renderScale:{renderScale}"); + //UniversalRenderPipelineAsset asset = UniversalRenderPipeline.asset; + //asset.renderScale = renderScale; + } + if (lastQuality != xess1ConfigParam.Quality) + { + UniversalRenderPipeline.asset.renderScale = GetRenderScale(); + lastQuality = xess1ConfigParam.Quality; } - var cameraData = renderingData.cameraData; - var camera = cameraData.camera; - Matrix4x4 projectionMatrix = camera.projectionMatrix; - Matrix4x4 jitterMat = CalculateJitterMatrix(ref cameraData, out Vector2 jitter); - cameraData.SetViewProjectionAndJitterMatrix(camera.worldToCameraMatrix, projectionMatrix, jitterMat); - cameraData.worldSpaceCameraPos = camera.transform.position; + cameraData.NeedJitter = true; + SuperResolutionParamSets.Instance.Set("MipmapBias", xess1ConfigParam.MipMapBias); + SuperResolutionParamSets.Instance.Set("JitterScale", xess1ConfigParam.JitterScaleX); - cmd.SetGlobalVector(ShaderPropertyId.globalMipBias, new Vector2(xess1ConfigParam.MipMapBias, Mathf.Pow(2.0f, xess1ConfigParam.MipMapBias))); + var jitter = TemporalAA.CurrentJitter; + + //cmd.SetGlobalVector(ShaderPropertyId.globalMipBias, new Vector2(xess1ConfigParam.MipMapBias, Mathf.Pow(2.0f, xess1ConfigParam.MipMapBias))); xessexecPtr->InputWidth = source.referenceSize.x; xessexecPtr->InputHeight = source.referenceSize.y; xessexecPtr->ExposureScale = 1.0f; + if (source.rt == null) + { + return; + } xessexecPtr->ColorTexture = source.rt.GetNativeTexturePtr(); xessexecPtr->VelocityTexture = motionVector.rt.GetNativeTexturePtr(); xessexecPtr->OutputTexture = destination.rt.GetNativeTexturePtr(); @@ -206,6 +192,29 @@ namespace X.Rendering.Feature break; } } + + public float GetRenderScale() + { + switch (xess1ConfigParam.Quality) + { + case XessQuality.UltraPerformance: + return 0.3335938f; + case XessQuality.Performance: + return 0.4351563f; + case XessQuality.Balanced: + return 0.5f; + case XessQuality.Quality: + return 0.5882813f; + case XessQuality.UltraQuality: + return 0.6667969f; + case XessQuality.UltraQualityPlus: + return 0.7695313f; + case XessQuality.NativeAA: + return 1.0f; + default: + throw new ArgumentOutOfRangeException(nameof(XessQuality)); + } + } } } diff --git a/Packages/com.unity.render-pipelines.universal@14.0.11/Runtime/SuperRendering/SRSettings.cs b/Packages/com.unity.render-pipelines.universal@14.0.11/Runtime/SuperRendering/SRSettings.cs index 2c0fd27..33ad0e6 100644 --- a/Packages/com.unity.render-pipelines.universal@14.0.11/Runtime/SuperRendering/SRSettings.cs +++ b/Packages/com.unity.render-pipelines.universal@14.0.11/Runtime/SuperRendering/SRSettings.cs @@ -6,10 +6,6 @@ namespace UnityEngine.Rendering.Universal { [SerializeField] private ESuperResolution superResolution; - [SerializeField] - private ERenderScale sSRenderScale; - - public ERenderScale SSRenderScale => sSRenderScale; public ESuperResolution SuperResolution => superResolution; @@ -21,39 +17,30 @@ namespace UnityEngine.Rendering.Universal private void UpdateSSSettings() { var renderer = GetRenderer(this.m_DefaultRendererIndex); + var renderScale = 1.0f; + bool hasActive = false; foreach (var item in renderer.rendererFeatures) { if (item is ISuperResolutionFeature isr) { isr.SetSR(superResolution); + if (item.isActive) + { + renderScale = isr.GetRenderScale(); + hasActive = true; + } } } - switch (sSRenderScale) + if (!hasActive) { - case ERenderScale.Factor1: - this.renderScale = 1.0f; - break; - case ERenderScale.Factor09: - this.renderScale = .9f; - break; - case ERenderScale.Factor08: - this.renderScale = .8f; - break; - case ERenderScale.Factor075: - this.renderScale = .75f; - break; - case ERenderScale.Factor06: - this.renderScale = .6f; - break; - case ERenderScale.Factor05: - this.renderScale = .5f; - break; - default: - break; + superResolution = ESuperResolution.None; + } + else + { + this.renderScale = renderScale; } - } protected override void OnValidate() diff --git a/Packages/com.unity.render-pipelines.universal@14.0.11/Runtime/TemporalAA.cs b/Packages/com.unity.render-pipelines.universal@14.0.11/Runtime/TemporalAA.cs index 5dcc574..df2b814 100644 --- a/Packages/com.unity.render-pipelines.universal@14.0.11/Runtime/TemporalAA.cs +++ b/Packages/com.unity.render-pipelines.universal@14.0.11/Runtime/TemporalAA.cs @@ -2,6 +2,7 @@ using System; using UnityEngine.Experimental.Rendering; using UnityEngine.Experimental.Rendering.RenderGraphModule; using UnityEngine.Serialization; +using X.Rendering.Feature; namespace UnityEngine.Rendering.Universal { @@ -301,7 +302,7 @@ namespace UnityEngine.Rendering.Universal { Matrix4x4 jitterMat = Matrix4x4.identity; - bool isJitter = cameraData.IsTemporalAAEnabled(); + bool isJitter = cameraData.IsTemporalAAEnabled() || cameraData.NeedJitter; jitter = Vector2.zero; if (isJitter) { @@ -310,7 +311,9 @@ namespace UnityEngine.Rendering.Universal float actualWidth = cameraData.cameraTargetDescriptor.width; float actualHeight = cameraData.cameraTargetDescriptor.height; - float jitterScale = cameraData.taaSettings.jitterScale; + float srJitterScale = 0; + SuperResolutionParamSets.Instance.Get("JitterScale", ref srJitterScale); + float jitterScale = Mathf.Max(cameraData.taaSettings.jitterScale, srJitterScale); jitter = CalculateJitter(taaFrameIndex) * jitterScale; @@ -323,9 +326,11 @@ namespace UnityEngine.Rendering.Universal return jitterMat; } + public static Vector2 CurrentJitter; + static internal Matrix4x4 CalculateJitterMatrix(ref CameraData cameraData) { - return CalculateJitterMatrix(ref cameraData, out var jitter); + return CalculateJitterMatrix(ref cameraData, out CurrentJitter); } static internal Vector2 CalculateJitter(int frameIndex) diff --git a/Packages/com.unity.render-pipelines.universal@14.0.11/Runtime/Unity.RenderPipelines.Universal.Runtime.asmdef b/Packages/com.unity.render-pipelines.universal@14.0.11/Runtime/Unity.RenderPipelines.Universal.Runtime.asmdef index 02be9e8..d9ea6be 100644 --- a/Packages/com.unity.render-pipelines.universal@14.0.11/Runtime/Unity.RenderPipelines.Universal.Runtime.asmdef +++ b/Packages/com.unity.render-pipelines.universal@14.0.11/Runtime/Unity.RenderPipelines.Universal.Runtime.asmdef @@ -7,7 +7,7 @@ "GUID:7dbf32976982c98448af054f2512cb79", "GUID:d8b63aba1907145bea998dd612889d6b", "GUID:2665a8d13d1b3f18800f46e256720795", - "GUID:86bc95e6fdb13ff43aa04316542905ae" + "GUID:86bc95e6fdb13ff43aa04316542905ae" ], "includePlatforms": [], "excludePlatforms": [], @@ -66,6 +66,16 @@ "name": "com.unity.inputsystem", "expression": "0.0.0", "define": "ENABLE_INPUT_SYSTEM_PACKAGE" + }, + { + "name": "com.unity.modules.nvidia", + "expression": "0.0.0", + "define": "ENABLE_NVIDIA_MODULE" + }, + { + "name": "com.unity.modules.nvidia", + "expression": "0.0.0", + "define": "ENABLE_NVIDIA" } ], "noEngineReferences": false diff --git a/Packages/com.unity.render-pipelines.universal@14.0.11/Runtime/UniversalRenderPipelineCore.cs b/Packages/com.unity.render-pipelines.universal@14.0.11/Runtime/UniversalRenderPipelineCore.cs index 1cb3644..1b42f08 100644 --- a/Packages/com.unity.render-pipelines.universal@14.0.11/Runtime/UniversalRenderPipelineCore.cs +++ b/Packages/com.unity.render-pipelines.universal@14.0.11/Runtime/UniversalRenderPipelineCore.cs @@ -5,6 +5,7 @@ using Unity.Collections.LowLevel.Unsafe; using UnityEngine.Assertions; using UnityEngine.Experimental.GlobalIllumination; using UnityEngine.Experimental.Rendering; +using X.Rendering.Feature; using Lightmapping = UnityEngine.Experimental.GlobalIllumination.Lightmapping; namespace UnityEngine.Rendering.Universal @@ -626,6 +627,8 @@ namespace UnityEngine.Rendering.Universal && postProcessEnabled; // No Postprocessing } + internal bool NeedJitter { get; set; } + /// /// The sorting criteria used when drawing opaque objects by the internal URP render passes. /// When a GPU supports hidden surface removal, URP will rely on that information to avoid sorting opaque objects front to back and @@ -744,7 +747,6 @@ namespace UnityEngine.Rendering.Universal get => taaSettings.resetHistoryFrames != 0; } - /// /// Camera at the top of the overlay camera stack /// diff --git a/Packages/manifest.json b/Packages/manifest.json index 62bf514..fed5f99 100644 --- a/Packages/manifest.json +++ b/Packages/manifest.json @@ -25,6 +25,7 @@ "com.unity.modules.imageconversion": "1.0.0", "com.unity.modules.imgui": "1.0.0", "com.unity.modules.jsonserialize": "1.0.0", + "com.unity.modules.nvidia": "1.0.0", "com.unity.modules.particlesystem": "1.0.0", "com.unity.modules.physics": "1.0.0", "com.unity.modules.physics2d": "1.0.0", diff --git a/Packages/packages-lock.json b/Packages/packages-lock.json index a5eed86..f9fe65b 100644 --- a/Packages/packages-lock.json +++ b/Packages/packages-lock.json @@ -283,6 +283,12 @@ "source": "builtin", "dependencies": {} }, + "com.unity.modules.nvidia": { + "version": "1.0.0", + "depth": 0, + "source": "builtin", + "dependencies": {} + }, "com.unity.modules.particlesystem": { "version": "1.0.0", "depth": 0, diff --git a/ProjectSettings/ProjectSettings.asset b/ProjectSettings/ProjectSettings.asset index e9ff1dc..8ab20e1 100644 --- a/ProjectSettings/ProjectSettings.asset +++ b/ProjectSettings/ProjectSettings.asset @@ -777,6 +777,9 @@ PlayerSettings: - m_BuildTarget: MacStandaloneSupport m_APIs: 10000000 m_Automatic: 0 + - m_BuildTarget: OpenHarmonyPlayer + m_APIs: 0b00000015000000 + m_Automatic: 1 m_BuildTargetVRSettings: [] m_DefaultShaderChunkSizeInMB: 16 m_DefaultShaderChunkCount: 8 @@ -1071,10 +1074,10 @@ PlayerSettings: webGLMemoryGeometricGrowthCap: 96 webGLPowerPreference: 2 scriptingDefineSymbols: - Android: STARTER_ASSETS_PACKAGES_CHECKED;RENDER_GRAPH_ENABLED + Android: STARTER_ASSETS_PACKAGES_CHECKED;RENDER_GRAPH_ENABLED;ENABLE_NVIDIA_MODULE;ENABLE_INPUT_SYSTEM Nintendo Switch: STARTER_ASSETS_PACKAGES_CHECKED - OpenHarmony: RENDER_GRAPH_ENABLED - Standalone: STARTER_ASSETS_PACKAGES_CHECKED;URP_EXPERIMENTAL_TAA_ENABLE;RENDER_GRAPH_ENABLED + OpenHarmony: RENDER_GRAPH_ENABLED;STARTER_ASSETS_PACKAGES_CHECKED;ENABLE_INPUT_SYSTEM + Standalone: STARTER_ASSETS_PACKAGES_CHECKED;URP_EXPERIMENTAL_TAA_ENABLE;RENDER_GRAPH_ENABLED;ENABLE_NVIDIA_MODULE;ENABLE_INPUT_SYSTEM iPhone: STARTER_ASSETS_PACKAGES_CHECKED additionalCompilerArguments: {} platformArchitecture: {} @@ -1221,7 +1224,7 @@ PlayerSettings: weixinMiniGameInjectStrippedMethodLogger: 0 weixinMiniGameEnableDotNetWasmExceptionHandling: 1 weixinMiniGamePreserveEventDelegate: 0 - activeInputHandler: 1 + activeInputHandler: 2 windowsGamepadBackendHint: 0 cloudProjectId: framebufferDepthMemorylessMode: 0 diff --git a/ProjectSettings/QualitySettings.asset b/ProjectSettings/QualitySettings.asset index b169e94..2915345 100644 --- a/ProjectSettings/QualitySettings.asset +++ b/ProjectSettings/QualitySettings.asset @@ -28,7 +28,7 @@ QualitySettings: realtimeReflectionProbes: 0 billboardsFaceCameraPosition: 1 useLegacyDetailDistribution: 1 - vSyncCount: 0 + vSyncCount: 1 realtimeGICPUUsage: 100 lodBias: 1 maximumLODLevel: 0 diff --git a/UserSettings/Layouts/default-2022.dwlt b/UserSettings/Layouts/default-2022.dwlt index 13c98f1..177d065 100644 --- a/UserSettings/Layouts/default-2022.dwlt +++ b/UserSettings/Layouts/default-2022.dwlt @@ -14,17 +14,41 @@ MonoBehaviour: m_EditorClassIdentifier: m_PixelRect: serializedVersion: 2 - x: 2886 - y: 183 - width: 1934 - height: 971 + x: 311 + y: 278 + width: 1551 + height: 1099 m_ShowMode: 0 - m_Title: Frame Debugger - m_RootView: {fileID: 4} - m_MinSize: {x: 1000, y: 521} + m_Title: Project Settings + m_RootView: {fileID: 5} + m_MinSize: {x: 310, y: 221} m_MaxSize: {x: 4000, y: 4021} m_Maximized: 0 --- !u!114 &2 +MonoBehaviour: + m_ObjectHideFlags: 52 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 12004, guid: 0000000000000000e000000000000000, type: 0} + m_Name: + m_EditorClassIdentifier: + m_PixelRect: + serializedVersion: 2 + x: 2818 + y: 201 + width: 1934 + height: 965 + m_ShowMode: 0 + m_Title: Frame Debugger + m_RootView: {fileID: 7} + m_MinSize: {x: 1000, y: 521} + m_MaxSize: {x: 4000, y: 4021} + m_Maximized: 0 +--- !u!114 &3 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -38,17 +62,68 @@ MonoBehaviour: m_EditorClassIdentifier: m_PixelRect: serializedVersion: 2 - x: 9 - y: 52 - width: 2542 - height: 1331 + x: 0 + y: 43 + width: 2560 + height: 1349 m_ShowMode: 4 m_Title: Console - m_RootView: {fileID: 13} + m_RootView: {fileID: 16} m_MinSize: {x: 875, y: 321} m_MaxSize: {x: 10000, y: 10000} - m_Maximized: 0 ---- !u!114 &3 + m_Maximized: 1 +--- !u!114 &4 +MonoBehaviour: + m_ObjectHideFlags: 52 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 12006, guid: 0000000000000000e000000000000000, type: 0} + m_Name: ProjectSettingsWindow + m_EditorClassIdentifier: + m_Children: [] + m_Position: + serializedVersion: 2 + x: 0 + y: 0 + width: 1551 + height: 1099 + m_MinSize: {x: 310, y: 200} + m_MaxSize: {x: 4000, y: 4000} + m_ActualView: {fileID: 20} + m_Panes: + - {fileID: 20} + m_Selected: 0 + m_LastSelected: 0 +--- !u!114 &5 +MonoBehaviour: + m_ObjectHideFlags: 52 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 12010, guid: 0000000000000000e000000000000000, type: 0} + m_Name: + m_EditorClassIdentifier: + m_Children: + - {fileID: 4} + m_Position: + serializedVersion: 2 + x: 0 + y: 0 + width: 1551 + height: 1099 + m_MinSize: {x: 310, y: 221} + m_MaxSize: {x: 4000, y: 4021} + vertical: 0 + controlID: 9761 + draggingID: 0 +--- !u!114 &6 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -66,15 +141,15 @@ MonoBehaviour: x: 0 y: 0 width: 1934 - height: 971 + height: 965 m_MinSize: {x: 1000, y: 521} m_MaxSize: {x: 4000, y: 4021} - m_ActualView: {fileID: 17} + m_ActualView: {fileID: 21} m_Panes: - - {fileID: 17} + - {fileID: 21} m_Selected: 0 m_LastSelected: 0 ---- !u!114 &4 +--- !u!114 &7 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -87,19 +162,19 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: m_Children: - - {fileID: 3} + - {fileID: 6} m_Position: serializedVersion: 2 x: 0 y: 0 width: 1934 - height: 971 + height: 965 m_MinSize: {x: 1000, y: 521} m_MaxSize: {x: 4000, y: 4021} vertical: 0 - controlID: 1238 + controlID: 3485 draggingID: 0 ---- !u!114 &5 +--- !u!114 &8 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -114,19 +189,19 @@ MonoBehaviour: m_Children: [] m_Position: serializedVersion: 2 - x: 439 + x: 391 y: 0 - width: 1662 - height: 759 - m_MinSize: {x: 200, y: 200} - m_MaxSize: {x: 4000, y: 4000} - m_ActualView: {fileID: 22} + width: 1472 + height: 770 + m_MinSize: {x: 202, y: 221} + m_MaxSize: {x: 4002, y: 4021} + m_ActualView: {fileID: 26} m_Panes: - {fileID: 22} - - {fileID: 18} - m_Selected: 0 - m_LastSelected: 1 ---- !u!114 &6 + - {fileID: 26} + m_Selected: 1 + m_LastSelected: 0 +--- !u!114 &9 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -139,20 +214,20 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: m_Children: - - {fileID: 11} - - {fileID: 5} + - {fileID: 14} + - {fileID: 8} m_Position: serializedVersion: 2 x: 0 y: 0 - width: 2101 - height: 759 + width: 1863 + height: 770 m_MinSize: {x: 200, y: 50} m_MaxSize: {x: 16192, y: 8096} vertical: 0 - controlID: 55 + controlID: 41 draggingID: 0 ---- !u!114 &7 +--- !u!114 &10 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -167,18 +242,18 @@ MonoBehaviour: m_Children: [] m_Position: serializedVersion: 2 - x: 1400 + x: 1245 y: 0 - width: 701 - height: 522 - m_MinSize: {x: 100, y: 100} - m_MaxSize: {x: 4000, y: 4000} - m_ActualView: {fileID: 23} + width: 618 + height: 529 + m_MinSize: {x: 102, y: 121} + m_MaxSize: {x: 4002, y: 4021} + m_ActualView: {fileID: 27} m_Panes: - - {fileID: 23} + - {fileID: 27} m_Selected: 0 m_LastSelected: 0 ---- !u!114 &8 +--- !u!114 &11 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -191,20 +266,20 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: m_Children: - - {fileID: 12} - - {fileID: 7} + - {fileID: 15} + - {fileID: 10} m_Position: serializedVersion: 2 x: 0 - y: 759 - width: 2101 - height: 522 + y: 770 + width: 1863 + height: 529 m_MinSize: {x: 200, y: 50} m_MaxSize: {x: 16192, y: 8096} vertical: 0 - controlID: 143 + controlID: 127 draggingID: 0 ---- !u!114 &9 +--- !u!114 &12 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -217,20 +292,20 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: m_Children: - - {fileID: 16} - - {fileID: 10} + - {fileID: 19} + - {fileID: 13} m_Position: serializedVersion: 2 x: 0 y: 30 - width: 2542 - height: 1281 + width: 2560 + height: 1299 m_MinSize: {x: 300, y: 100} m_MaxSize: {x: 24288, y: 16192} vertical: 0 - controlID: 141 + controlID: 163 draggingID: 0 ---- !u!114 &10 +--- !u!114 &13 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -245,18 +320,18 @@ MonoBehaviour: m_Children: [] m_Position: serializedVersion: 2 - x: 2101 + x: 1863 y: 0 - width: 441 - height: 1281 - m_MinSize: {x: 275, y: 50} - m_MaxSize: {x: 4000, y: 4000} - m_ActualView: {fileID: 20} + width: 697 + height: 1299 + m_MinSize: {x: 276, y: 71} + m_MaxSize: {x: 4001, y: 4021} + m_ActualView: {fileID: 24} m_Panes: - - {fileID: 20} + - {fileID: 24} m_Selected: 0 m_LastSelected: 0 ---- !u!114 &11 +--- !u!114 &14 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -273,16 +348,16 @@ MonoBehaviour: serializedVersion: 2 x: 0 y: 0 - width: 439 - height: 759 - m_MinSize: {x: 200, y: 200} - m_MaxSize: {x: 4000, y: 4000} - m_ActualView: {fileID: 21} + width: 391 + height: 770 + m_MinSize: {x: 201, y: 221} + m_MaxSize: {x: 4001, y: 4021} + m_ActualView: {fileID: 25} m_Panes: - - {fileID: 21} + - {fileID: 25} m_Selected: 0 m_LastSelected: 0 ---- !u!114 &12 +--- !u!114 &15 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -299,16 +374,16 @@ MonoBehaviour: serializedVersion: 2 x: 0 y: 0 - width: 1400 - height: 522 + width: 1245 + height: 529 m_MinSize: {x: 231, y: 271} m_MaxSize: {x: 10001, y: 10021} - m_ActualView: {fileID: 19} + m_ActualView: {fileID: 23} m_Panes: - - {fileID: 19} + - {fileID: 23} m_Selected: 0 m_LastSelected: 0 ---- !u!114 &13 +--- !u!114 &16 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -321,22 +396,22 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: m_Children: - - {fileID: 14} - - {fileID: 9} - - {fileID: 15} + - {fileID: 17} + - {fileID: 12} + - {fileID: 18} m_Position: serializedVersion: 2 x: 0 y: 0 - width: 2542 - height: 1331 + width: 2560 + height: 1349 m_MinSize: {x: 875, y: 300} m_MaxSize: {x: 10000, y: 10000} m_UseTopView: 1 m_TopViewHeight: 30 m_UseBottomView: 1 m_BottomViewHeight: 20 ---- !u!114 &14 +--- !u!114 &17 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -353,12 +428,12 @@ MonoBehaviour: serializedVersion: 2 x: 0 y: 0 - width: 2542 + width: 2560 height: 30 m_MinSize: {x: 0, y: 0} m_MaxSize: {x: 0, y: 0} m_LastLoadedLayoutName: ---- !u!114 &15 +--- !u!114 &18 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -374,12 +449,12 @@ MonoBehaviour: m_Position: serializedVersion: 2 x: 0 - y: 1311 - width: 2542 + y: 1329 + width: 2560 height: 20 m_MinSize: {x: 0, y: 0} m_MaxSize: {x: 0, y: 0} ---- !u!114 &16 +--- !u!114 &19 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -392,20 +467,81 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: m_Children: - - {fileID: 6} - - {fileID: 8} + - {fileID: 9} + - {fileID: 11} m_Position: serializedVersion: 2 x: 0 y: 0 - width: 2101 - height: 1281 + width: 1863 + height: 1299 m_MinSize: {x: 200, y: 100} m_MaxSize: {x: 16192, y: 16192} vertical: 1 - controlID: 142 + controlID: 126 draggingID: 0 ---- !u!114 &17 +--- !u!114 &20 +MonoBehaviour: + m_ObjectHideFlags: 52 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 13854, guid: 0000000000000000e000000000000000, type: 0} + m_Name: + m_EditorClassIdentifier: + m_MinSize: {x: 310, y: 200} + m_MaxSize: {x: 4000, y: 4000} + m_TitleContent: + m_Text: Project Settings + m_Image: {fileID: -5712115415447495865, guid: 0000000000000000d000000000000000, type: 0} + m_Tooltip: + m_Pos: + serializedVersion: 2 + x: 311 + y: 278 + width: 1551 + height: 1078 + m_SerializedDataModeController: + m_DataMode: 0 + m_PreferredDataMode: 0 + m_SupportedDataModes: + isAutomatic: 1 + m_ViewDataDictionary: {fileID: 0} + m_OverlayCanvas: + m_LastAppliedPresetName: Default + m_SaveData: [] + m_OverlaysVisible: 1 + m_PosLeft: {x: 0, y: 0} + m_PosRight: {x: 0, y: 1080} + m_Scope: 1 + m_SplitterFlex: 0.2 + m_SearchText: input + m_TreeViewState: + scrollPos: {x: 0, y: 0} + m_SelectedIDs: 4dcf9b58 + m_LastClickedID: 1486606157 + m_ExpandedIDs: 53336be2000000007f0eae07 + m_RenameOverlay: + m_UserAcceptedRename: 0 + m_Name: + m_OriginalName: + m_EditFieldRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 0 + height: 0 + m_UserData: 0 + m_IsWaitingForDelay: 0 + m_IsRenaming: 0 + m_OriginalEventType: 11 + m_IsRenamingFilename: 0 + m_ClientGUIView: {fileID: 0} + m_SearchString: input +--- !u!114 &21 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -425,10 +561,10 @@ MonoBehaviour: m_Tooltip: m_Pos: serializedVersion: 2 - x: 2886 - y: 183 + x: 2818 + y: 201 width: 1934 - height: 950 + height: 944 m_SerializedDataModeController: m_DataMode: 0 m_PreferredDataMode: 0 @@ -462,7 +598,7 @@ MonoBehaviour: m_IsRenamingFilename: 0 m_ClientGUIView: {fileID: 0} m_SearchString: ---- !u!114 &18 +--- !u!114 &22 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -482,10 +618,10 @@ MonoBehaviour: m_Tooltip: m_Pos: serializedVersion: 2 - x: 448 - y: 82 - width: 1660 - height: 738 + x: 391 + y: 73 + width: 1470 + height: 749 m_SerializedDataModeController: m_DataMode: 0 m_PreferredDataMode: 0 @@ -818,9 +954,9 @@ MonoBehaviour: m_PlayAudio: 0 m_AudioPlay: 0 m_Position: - m_Target: {x: -12.694475, y: -1.2633355, z: -116.92392} + m_Target: {x: -33.845665, y: -11.687641, z: -27.991777} speed: 2 - m_Value: {x: -12.694475, y: -1.2633355, z: -116.92392} + m_Value: {x: -33.845665, y: -11.687641, z: -27.991777} m_RenderMode: 0 m_CameraMode: drawMode: 0 @@ -866,13 +1002,13 @@ MonoBehaviour: m_GridAxis: 1 m_gridOpacity: 0.5 m_Rotation: - m_Target: {x: -0.018844485, y: 0.9119891, z: -0.40760815, w: -0.042162955} + m_Target: {x: -0.06818097, y: 0.92434114, z: -0.19731537, w: -0.3193994} speed: 2 - m_Value: {x: -0.018844472, y: 0.91198844, z: -0.40760785, w: -0.042162925} + m_Value: {x: -0.06818082, y: 0.9243392, z: -0.19731495, w: -0.3193987} m_Size: - m_Target: 10 + m_Target: 28.653723 speed: 2 - m_Value: 10 + m_Value: 28.653723 m_Ortho: m_Target: 0 speed: 2 @@ -899,7 +1035,7 @@ MonoBehaviour: m_SceneVisActive: 1 m_LastLockedObject: {fileID: 0} m_ViewIsLockedToObject: 0 ---- !u!114 &19 +--- !u!114 &23 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -919,10 +1055,10 @@ MonoBehaviour: m_Tooltip: m_Pos: serializedVersion: 2 - x: -32000 - y: -31211 - width: 1399 - height: 501 + x: 0 + y: 843 + width: 1244 + height: 508 m_SerializedDataModeController: m_DataMode: 0 m_PreferredDataMode: 0 @@ -944,7 +1080,7 @@ MonoBehaviour: m_SkipHidden: 0 m_SearchArea: 1 m_Folders: - - Assets/Settings/Mobile + - Assets/Scenes/Cockpit m_Globs: [] m_OriginalText: m_ImportLogFlags: 0 @@ -952,16 +1088,16 @@ MonoBehaviour: m_ViewMode: 1 m_StartGridSize: 16 m_LastFolders: - - Assets/Settings/Mobile + - Assets/Scenes/Cockpit m_LastFoldersGridSize: 16 m_LastProjectPath: G:\TJURP m_LockTracker: m_IsLocked: 0 m_FolderTreeState: - scrollPos: {x: 0, y: 0} - m_SelectedIDs: 82bb0000 - m_LastClickedID: 48002 - m_ExpandedIDs: 0000000052b8000054b8000056b8000058b800005ab800005cb800005eb8000060b8000062b8000064b8000066b8000068b800006ab800006cb800006eb8000070b8000000ca9a3bffffff7f + scrollPos: {x: 0, y: 136} + m_SelectedIDs: 3e0f0100 + m_LastClickedID: 69438 + m_ExpandedIDs: 00000000260f0100280f01002a0f01002c0f01002e0f0100300f0100320f0100340f0100360f0100380f01003a0f01003c0f01003e0f0100400f0100420f0100440f0100460f01007e0f0100de18010000ca9a3bffffff7f m_RenameOverlay: m_UserAcceptedRename: 0 m_Name: @@ -977,7 +1113,7 @@ MonoBehaviour: m_IsRenaming: 0 m_OriginalEventType: 11 m_IsRenamingFilename: 1 - m_ClientGUIView: {fileID: 12} + m_ClientGUIView: {fileID: 15} m_SearchString: m_CreateAssetUtility: m_EndAction: {fileID: 0} @@ -989,7 +1125,7 @@ MonoBehaviour: scrollPos: {x: 0, y: 0} m_SelectedIDs: m_LastClickedID: 0 - m_ExpandedIDs: 0000000052b8000054b8000056b8000058b800005ab800005cb800005eb8000060b8000062b8000064b8000066b8000068b800006ab800006cb800006eb8000070b80000 + m_ExpandedIDs: 00000000260f0100280f01002a0f01002c0f01002e0f0100300f0100320f0100340f0100360f0100380f01003a0f01003c0f01003e0f0100400f0100420f0100440f0100460f0100 m_RenameOverlay: m_UserAcceptedRename: 0 m_Name: @@ -1033,7 +1169,7 @@ MonoBehaviour: m_IsRenaming: 0 m_OriginalEventType: 11 m_IsRenamingFilename: 1 - m_ClientGUIView: {fileID: 12} + m_ClientGUIView: {fileID: 15} m_CreateAssetUtility: m_EndAction: {fileID: 0} m_InstanceID: 0 @@ -1045,7 +1181,7 @@ MonoBehaviour: m_GridSize: 16 m_SkipHiddenPackages: 0 m_DirectoriesAreaWidth: 207 ---- !u!114 &20 +--- !u!114 &24 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -1065,10 +1201,10 @@ MonoBehaviour: m_Tooltip: m_Pos: serializedVersion: 2 - x: -29899 - y: -31970 - width: 440 - height: 1260 + x: 1863 + y: 73 + width: 696 + height: 1278 m_SerializedDataModeController: m_DataMode: 0 m_PreferredDataMode: 0 @@ -1082,7 +1218,7 @@ MonoBehaviour: m_ObjectsLockedBeforeSerialization: [] m_InstanceIDsLockedBeforeSerialization: m_PreviewResizer: - m_CachedPref: 482 + m_CachedPref: -482 m_ControlHash: -371814159 m_PrefName: Preview_InspectorPreview m_LastInspectedObjectInstanceID: -1 @@ -1092,7 +1228,7 @@ MonoBehaviour: m_LockTracker: m_IsLocked: 0 m_PreviewWindow: {fileID: 0} ---- !u!114 &21 +--- !u!114 &25 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -1112,10 +1248,10 @@ MonoBehaviour: m_Tooltip: m_Pos: serializedVersion: 2 - x: -32000 - y: -31970 - width: 438 - height: 738 + x: 0 + y: 73 + width: 390 + height: 749 m_SerializedDataModeController: m_DataMode: 0 m_PreferredDataMode: 0 @@ -1129,9 +1265,9 @@ MonoBehaviour: m_SceneHierarchy: m_TreeViewState: scrollPos: {x: 0, y: 0} - m_SelectedIDs: 48030000 + m_SelectedIDs: 3633fdff m_LastClickedID: 0 - m_ExpandedIDs: 46faffff + m_ExpandedIDs: ce64fdffd064fdff9abdfdff84ccfdff02b5feff9abdfeffe4bdfeff48c1fefff4ffffff7a0a01004c0b01004c240100d4240100 m_RenameOverlay: m_UserAcceptedRename: 0 m_Name: @@ -1147,7 +1283,7 @@ MonoBehaviour: m_IsRenaming: 0 m_OriginalEventType: 11 m_IsRenamingFilename: 0 - m_ClientGUIView: {fileID: 11} + m_ClientGUIView: {fileID: 14} m_SearchString: m_ExpandedScenes: [] m_CurrenRootInstanceID: 0 @@ -1155,7 +1291,7 @@ MonoBehaviour: m_IsLocked: 0 m_CurrentSortingName: TransformSorting m_WindowGUID: 4c969a2b90040154d917609493e03593 ---- !u!114 &22 +--- !u!114 &26 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -1175,10 +1311,10 @@ MonoBehaviour: m_Tooltip: m_Pos: serializedVersion: 2 - x: -31561 - y: -31970 - width: 1660 - height: 738 + x: 391 + y: 73 + width: 1470 + height: 749 m_SerializedDataModeController: m_DataMode: 0 m_PreferredDataMode: 0 @@ -1195,7 +1331,7 @@ MonoBehaviour: m_ShowGizmos: 0 m_TargetDisplay: 0 m_ClearColor: {r: 0, g: 0, b: 0, a: 0} - m_TargetSize: {x: 1920, y: 1080} + m_TargetSize: {x: 2560, y: 1440} m_TextureFilterMode: 0 m_TextureHideFlags: 61 m_RenderIMGUI: 1 @@ -1204,16 +1340,16 @@ MonoBehaviour: m_VSyncEnabled: 0 m_Gizmos: 0 m_Stats: 0 - m_SelectedSizes: 00000000000000000000000006000000000000000000000000000000000000000000000000000000 + m_SelectedSizes: 0500000000000000000000000a000000000000000000000000000000000000000000000000000000 m_ZoomArea: m_HRangeLocked: 0 m_VRangeLocked: 0 hZoomLockedByDefault: 0 vZoomLockedByDefault: 0 - m_HBaseRangeMin: -960 - m_HBaseRangeMax: 960 - m_VBaseRangeMin: -540 - m_VBaseRangeMax: 540 + m_HBaseRangeMin: -1280 + m_HBaseRangeMax: 1280 + m_VBaseRangeMin: -720 + m_VBaseRangeMax: 720 m_HAllowExceedBaseRangeMin: 1 m_HAllowExceedBaseRangeMax: 1 m_VAllowExceedBaseRangeMin: 1 @@ -1231,29 +1367,29 @@ MonoBehaviour: serializedVersion: 2 x: 0 y: 21 - width: 1660 - height: 717 - m_Scale: {x: 0.6638889, y: 0.6638889} - m_Translation: {x: 830, y: 358.5} + width: 1470 + height: 728 + m_Scale: {x: 0.50555557, y: 0.50555557} + m_Translation: {x: 735, y: 364} m_MarginLeft: 0 m_MarginRight: 0 m_MarginTop: 0 m_MarginBottom: 0 m_LastShownAreaInsideMargins: serializedVersion: 2 - x: -1250.2092 - y: -540 - width: 2500.4185 - height: 1080 + x: -1453.8461 + y: -720 + width: 2907.6921 + height: 1440 m_MinimalGUI: 1 - m_defaultScale: 0.6638889 - m_LastWindowPixelSize: {x: 1660, y: 738} + m_defaultScale: 0.50555557 + m_LastWindowPixelSize: {x: 1470, y: 749} m_ClearInEditMode: 1 m_NoCameraWarning: 1 - m_LowResolutionForAspectRatios: 00000001000000000000 + m_LowResolutionForAspectRatios: 01000001000000000000 m_XRRenderMode: 0 m_RenderTexture: {fileID: 0} ---- !u!114 &23 +--- !u!114 &27 MonoBehaviour: m_ObjectHideFlags: 52 m_CorrespondingSourceObject: {fileID: 0} @@ -1273,10 +1409,10 @@ MonoBehaviour: m_Tooltip: m_Pos: serializedVersion: 2 - x: -30600 - y: -31211 - width: 699 - height: 501 + x: 1245 + y: 843 + width: 616 + height: 508 m_SerializedDataModeController: m_DataMode: 0 m_PreferredDataMode: 0