diff --git a/Assets/Scenes/Test.cs b/Assets/Scenes/Test.cs index b2f25b7..d30aef5 100644 --- a/Assets/Scenes/Test.cs +++ b/Assets/Scenes/Test.cs @@ -25,7 +25,7 @@ public class Test : MonoBehaviour private void Update() { - transform?.Rotate(new Vector3(0, 0.5f, 0)); + transform?.Rotate(new Vector3(0, 0.1f, 0)); } private void OnGUI() diff --git a/Assets/Scenes/Test.cs.meta b/Assets/Scenes/Test.cs.meta index 2df8e81..d17b863 100644 --- a/Assets/Scenes/Test.cs.meta +++ b/Assets/Scenes/Test.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: Xnwd4ymoVn5T21JNkRdz/wbaTps3w3Z40N+XT4ognLZgPi/O+54tq4M= +guid: a8f562490b8d41b47a6b21e2f514d782 MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/Assets/Settings/Mobile/Mobile_High.asset b/Assets/Settings/Mobile/Mobile_High.asset index 35933c4..b11d182 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.3335938 m_UpscalingFilter: 0 m_FsrOverrideSharpness: 1 m_FsrSharpness: 1 @@ -114,5 +114,5 @@ MonoBehaviour: m_PrefilterNativeRenderPass: 1 m_ShaderVariantLogLevel: 0 m_ShadowCascades: 0 - superResolution: 12 + superResolution: 16 vrsRate: 0 diff --git a/Assets/Settings/Mobile/Mobile_High_Renderer.asset b/Assets/Settings/Mobile/Mobile_High_Renderer.asset index deb1d73..4e1dec9 100644 --- a/Assets/Settings/Mobile/Mobile_High_Renderer.asset +++ b/Assets/Settings/Mobile/Mobile_High_Renderer.asset @@ -102,7 +102,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: f5759a0bb27e83b4ab2925ac09c35710, type: 3} m_Name: DLSS m_EditorClassIdentifier: - m_Active: 1 + m_Active: 0 quality: 1 useOptimalSetting: 1 sharpness: 0.126 @@ -318,25 +318,26 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: b1643a5e9ea49724e8a7bc2c6f3713e1, type: 3} m_Name: XESS m_EditorClassIdentifier: - m_Active: 0 + m_Active: 1 xess1ConfigParam: - OutputWidth: 0 - OutputHeight: 0 - Quality: 0 + OutputWidth: 2560 + OutputHeight: 1440 + Quality: 103 UseHiResMotionVectors: 0 UseJitteredMotionVectors: 0 - UseMotionVectorsInNDC: 0 + UseMotionVectorsInNDC: 1 UseExposureTexture: 0 UseResponsiveMask: 0 UseAutoExposure: 0 EnableProfiling: 0 - InvertedDepth: 0 - VelocityScaleX: 0 - VelocityScaleY: 0 - JitterScaleX: 0 - JitterScaleY: 0 - ExposureScale: 0 - MipMapBias: 0 + InvertedDepth: 1 + VelocityScaleX: 1 + VelocityScaleY: 1 + JitterScaleX: 1 + JitterScaleY: 1 + ExposureScale: 1 + MipMapBias: -2.13 + antiGhosting: 0.385 --- !u!114 &6334271670068977784 MonoBehaviour: m_ObjectHideFlags: 0 diff --git a/Packages/com.nvidia.streamline.core-0.0.1-alpha1.dev/package/Plugins/x86_64/sl.pcl.dll.meta b/Packages/com.nvidia.streamline.core-0.0.1-alpha1.dev/package/Plugins/x86_64/sl.pcl.dll.meta deleted file mode 100644 index d6ddc05..0000000 --- a/Packages/com.nvidia.streamline.core-0.0.1-alpha1.dev/package/Plugins/x86_64/sl.pcl.dll.meta +++ /dev/null @@ -1,27 +0,0 @@ -fileFormatVersion: 2 -guid: aa3cdfd7567ede4499cc98b29a53314c -PluginImporter: - externalObjects: {} - serializedVersion: 2 - iconMap: {} - executionOrder: {} - defineConstraints: [] - isPreloaded: 0 - isOverridable: 0 - isExplicitlyReferenced: 0 - validateReferences: 1 - platformData: - - first: - Any: - second: - enabled: 1 - settings: {} - - first: - Editor: Editor - second: - enabled: 0 - settings: - DefaultValueInitialized: true - userData: - assetBundleName: - assetBundleVariant: diff --git a/Packages/com.nvidia.streamline.core-0.0.1-alpha1.dev/package/Runtime/StreamlineDLSSCore.cs.meta b/Packages/com.nvidia.streamline.core-0.0.1-alpha1.dev/package/Runtime/StreamlineDLSSCore.cs.meta new file mode 100644 index 0000000..3c7e474 --- /dev/null +++ b/Packages/com.nvidia.streamline.core-0.0.1-alpha1.dev/package/Runtime/StreamlineDLSSCore.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: a5171d7af8fd96541abc84cf8775397e +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins.meta b/Packages/com.unity.render-pipelines.universal@14.0.11/Runtime/Plugins.meta similarity index 100% rename from Assets/Plugins.meta rename to Packages/com.unity.render-pipelines.universal@14.0.11/Runtime/Plugins.meta diff --git a/Assets/Plugins/Android.meta b/Packages/com.unity.render-pipelines.universal@14.0.11/Runtime/Plugins/Android.meta similarity index 100% rename from Assets/Plugins/Android.meta rename to Packages/com.unity.render-pipelines.universal@14.0.11/Runtime/Plugins/Android.meta diff --git a/Assets/Plugins/Android/libGfxPluginNativeRender.so b/Packages/com.unity.render-pipelines.universal@14.0.11/Runtime/Plugins/Android/libGfxPluginNativeRender.so similarity index 100% rename from Assets/Plugins/Android/libGfxPluginNativeRender.so rename to Packages/com.unity.render-pipelines.universal@14.0.11/Runtime/Plugins/Android/libGfxPluginNativeRender.so diff --git a/Assets/Plugins/Android/libGfxPluginNativeRender.so.meta b/Packages/com.unity.render-pipelines.universal@14.0.11/Runtime/Plugins/Android/libGfxPluginNativeRender.so.meta similarity index 100% rename from Assets/Plugins/Android/libGfxPluginNativeRender.so.meta rename to Packages/com.unity.render-pipelines.universal@14.0.11/Runtime/Plugins/Android/libGfxPluginNativeRender.so.meta diff --git a/Assets/Plugins/Mac.meta b/Packages/com.unity.render-pipelines.universal@14.0.11/Runtime/Plugins/Mac.meta similarity index 100% rename from Assets/Plugins/Mac.meta rename to Packages/com.unity.render-pipelines.universal@14.0.11/Runtime/Plugins/Mac.meta diff --git a/Assets/Plugins/Mac/MetalFX.swift b/Packages/com.unity.render-pipelines.universal@14.0.11/Runtime/Plugins/Mac/MetalFX.swift similarity index 100% rename from Assets/Plugins/Mac/MetalFX.swift rename to Packages/com.unity.render-pipelines.universal@14.0.11/Runtime/Plugins/Mac/MetalFX.swift diff --git a/Assets/Plugins/Mac/MetalFX.swift.meta b/Packages/com.unity.render-pipelines.universal@14.0.11/Runtime/Plugins/Mac/MetalFX.swift.meta similarity index 100% rename from Assets/Plugins/Mac/MetalFX.swift.meta rename to Packages/com.unity.render-pipelines.universal@14.0.11/Runtime/Plugins/Mac/MetalFX.swift.meta diff --git a/Assets/Plugins/Mac/libGfxPluginNativeRender.dylib b/Packages/com.unity.render-pipelines.universal@14.0.11/Runtime/Plugins/Mac/libGfxPluginNativeRender.dylib old mode 100755 new mode 100644 similarity index 100% rename from Assets/Plugins/Mac/libGfxPluginNativeRender.dylib rename to Packages/com.unity.render-pipelines.universal@14.0.11/Runtime/Plugins/Mac/libGfxPluginNativeRender.dylib diff --git a/Assets/Plugins/Mac/libGfxPluginNativeRender.dylib.meta b/Packages/com.unity.render-pipelines.universal@14.0.11/Runtime/Plugins/Mac/libGfxPluginNativeRender.dylib.meta similarity index 100% rename from Assets/Plugins/Mac/libGfxPluginNativeRender.dylib.meta rename to Packages/com.unity.render-pipelines.universal@14.0.11/Runtime/Plugins/Mac/libGfxPluginNativeRender.dylib.meta diff --git a/Assets/Plugins/Windows.meta b/Packages/com.unity.render-pipelines.universal@14.0.11/Runtime/Plugins/Windows.meta similarity index 100% rename from Assets/Plugins/Windows.meta rename to Packages/com.unity.render-pipelines.universal@14.0.11/Runtime/Plugins/Windows.meta diff --git a/Assets/Plugins/Windows/GfxPluginNativeRender.dll b/Packages/com.unity.render-pipelines.universal@14.0.11/Runtime/Plugins/Windows/GfxPluginNativeRender.dll similarity index 99% rename from Assets/Plugins/Windows/GfxPluginNativeRender.dll rename to Packages/com.unity.render-pipelines.universal@14.0.11/Runtime/Plugins/Windows/GfxPluginNativeRender.dll index 3b91eae..e680352 100644 Binary files a/Assets/Plugins/Windows/GfxPluginNativeRender.dll and b/Packages/com.unity.render-pipelines.universal@14.0.11/Runtime/Plugins/Windows/GfxPluginNativeRender.dll differ diff --git a/Assets/Plugins/Windows/GfxPluginNativeRender.dll.meta b/Packages/com.unity.render-pipelines.universal@14.0.11/Runtime/Plugins/Windows/GfxPluginNativeRender.dll.meta similarity index 100% rename from Assets/Plugins/Windows/GfxPluginNativeRender.dll.meta rename to Packages/com.unity.render-pipelines.universal@14.0.11/Runtime/Plugins/Windows/GfxPluginNativeRender.dll.meta diff --git a/Assets/Plugins/Windows/libxess.dll b/Packages/com.unity.render-pipelines.universal@14.0.11/Runtime/Plugins/Windows/libxess.dll similarity index 100% rename from Assets/Plugins/Windows/libxess.dll rename to Packages/com.unity.render-pipelines.universal@14.0.11/Runtime/Plugins/Windows/libxess.dll diff --git a/Assets/Plugins/Windows/libxess.dll.meta b/Packages/com.unity.render-pipelines.universal@14.0.11/Runtime/Plugins/Windows/libxess.dll.meta similarity index 100% rename from Assets/Plugins/Windows/libxess.dll.meta rename to Packages/com.unity.render-pipelines.universal@14.0.11/Runtime/Plugins/Windows/libxess.dll.meta diff --git a/Assets/Plugins/iOS.meta b/Packages/com.unity.render-pipelines.universal@14.0.11/Runtime/Plugins/iOS.meta similarity index 100% rename from Assets/Plugins/iOS.meta rename to Packages/com.unity.render-pipelines.universal@14.0.11/Runtime/Plugins/iOS.meta diff --git a/Assets/Plugins/iOS/IUnityGraphics.h b/Packages/com.unity.render-pipelines.universal@14.0.11/Runtime/Plugins/iOS/IUnityGraphics.h similarity index 98% rename from Assets/Plugins/iOS/IUnityGraphics.h rename to Packages/com.unity.render-pipelines.universal@14.0.11/Runtime/Plugins/iOS/IUnityGraphics.h index eb47f84..d1f7bf9 100644 --- a/Assets/Plugins/iOS/IUnityGraphics.h +++ b/Packages/com.unity.render-pipelines.universal@14.0.11/Runtime/Plugins/iOS/IUnityGraphics.h @@ -1,62 +1,62 @@ -// Unity Native Plugin API copyright © 2015 Unity Technologies ApS -// -// Licensed under the Unity Companion License for Unity - dependent projects--see[Unity Companion License](http://www.unity3d.com/legal/licenses/Unity_Companion_License). -// -// Unless expressly provided otherwise, the Software under this license is made available strictly on an “AS IS” BASIS WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED.Please review the license for details on these and other terms and conditions. - -#pragma once -#include "IUnityInterface.h" - -// Has to match the GfxDeviceRenderer enum -typedef enum UnityGfxRenderer -{ - //kUnityGfxRendererOpenGL = 0, // Legacy OpenGL, removed - //kUnityGfxRendererD3D9 = 1, // Direct3D 9, removed - kUnityGfxRendererD3D11 = 2, // Direct3D 11 - kUnityGfxRendererNull = 4, // "null" device (used in batch mode) - //kUnityGfxRendererOpenGLES20 = 8, // OpenGL ES 2.0, removed - kUnityGfxRendererOpenGLES30 = 11, // OpenGL ES 3.0 - //kUnityGfxRendererGXM = 12, // PlayStation Vita, removed - kUnityGfxRendererPS4 = 13, // PlayStation 4 - kUnityGfxRendererXboxOne = 14, // Xbox One - kUnityGfxRendererMetal = 16, // iOS Metal - kUnityGfxRendererOpenGLCore = 17, // OpenGL core - kUnityGfxRendererD3D12 = 18, // Direct3D 12 - kUnityGfxRendererVulkan = 21, // Vulkan - kUnityGfxRendererNvn = 22, // Nintendo Switch NVN API - kUnityGfxRendererXboxOneD3D12 = 23, // MS XboxOne Direct3D 12 - kUnityGfxRendererGameCoreXboxOne = 24, // GameCore Xbox One - kUnityGfxRendererGameCoreXboxSeries = 25, // GameCore XboxSeries - kUnityGfxRendererPS5 = 26, // PS5 - kUnityGfxRendererPS5NGGC = 27 // PS5 NGGC -} UnityGfxRenderer; - -typedef enum UnityGfxDeviceEventType -{ - kUnityGfxDeviceEventInitialize = 0, - kUnityGfxDeviceEventShutdown = 1, - kUnityGfxDeviceEventBeforeReset = 2, - kUnityGfxDeviceEventAfterReset = 3, -} UnityGfxDeviceEventType; - -typedef void (UNITY_INTERFACE_API * IUnityGraphicsDeviceEventCallback)(UnityGfxDeviceEventType eventType); - -// Should only be used on the rendering thread unless noted otherwise. -UNITY_DECLARE_INTERFACE(IUnityGraphics) -{ - UnityGfxRenderer(UNITY_INTERFACE_API * GetRenderer)(); // Thread safe - - // This callback will be called when graphics device is created, destroyed, reset, etc. - // It is possible to miss the kUnityGfxDeviceEventInitialize event in case plugin is loaded at a later time, - // when the graphics device is already created. - void(UNITY_INTERFACE_API * RegisterDeviceEventCallback)(IUnityGraphicsDeviceEventCallback callback); - void(UNITY_INTERFACE_API * UnregisterDeviceEventCallback)(IUnityGraphicsDeviceEventCallback callback); - int(UNITY_INTERFACE_API * ReserveEventIDRange)(int count); // reserves 'count' event IDs. Plugins should use the result as a base index when issuing events back and forth to avoid event id clashes. -}; -UNITY_REGISTER_INTERFACE_GUID(0x7CBA0A9CA4DDB544ULL, 0x8C5AD4926EB17B11ULL, IUnityGraphics) - - -// Certain Unity APIs (GL.IssuePluginEvent, CommandBuffer.IssuePluginEvent) can callback into native plugins. -// Provide them with an address to a function of this signature. -typedef void (UNITY_INTERFACE_API * UnityRenderingEvent)(int eventId); -typedef void (UNITY_INTERFACE_API * UnityRenderingEventAndData)(int eventId, void* data); +// Unity Native Plugin API copyright © 2015 Unity Technologies ApS +// +// Licensed under the Unity Companion License for Unity - dependent projects--see[Unity Companion License](http://www.unity3d.com/legal/licenses/Unity_Companion_License). +// +// Unless expressly provided otherwise, the Software under this license is made available strictly on an “AS IS” BASIS WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED.Please review the license for details on these and other terms and conditions. + +#pragma once +#include "IUnityInterface.h" + +// Has to match the GfxDeviceRenderer enum +typedef enum UnityGfxRenderer +{ + //kUnityGfxRendererOpenGL = 0, // Legacy OpenGL, removed + //kUnityGfxRendererD3D9 = 1, // Direct3D 9, removed + kUnityGfxRendererD3D11 = 2, // Direct3D 11 + kUnityGfxRendererNull = 4, // "null" device (used in batch mode) + //kUnityGfxRendererOpenGLES20 = 8, // OpenGL ES 2.0, removed + kUnityGfxRendererOpenGLES30 = 11, // OpenGL ES 3.0 + //kUnityGfxRendererGXM = 12, // PlayStation Vita, removed + kUnityGfxRendererPS4 = 13, // PlayStation 4 + kUnityGfxRendererXboxOne = 14, // Xbox One + kUnityGfxRendererMetal = 16, // iOS Metal + kUnityGfxRendererOpenGLCore = 17, // OpenGL core + kUnityGfxRendererD3D12 = 18, // Direct3D 12 + kUnityGfxRendererVulkan = 21, // Vulkan + kUnityGfxRendererNvn = 22, // Nintendo Switch NVN API + kUnityGfxRendererXboxOneD3D12 = 23, // MS XboxOne Direct3D 12 + kUnityGfxRendererGameCoreXboxOne = 24, // GameCore Xbox One + kUnityGfxRendererGameCoreXboxSeries = 25, // GameCore XboxSeries + kUnityGfxRendererPS5 = 26, // PS5 + kUnityGfxRendererPS5NGGC = 27 // PS5 NGGC +} UnityGfxRenderer; + +typedef enum UnityGfxDeviceEventType +{ + kUnityGfxDeviceEventInitialize = 0, + kUnityGfxDeviceEventShutdown = 1, + kUnityGfxDeviceEventBeforeReset = 2, + kUnityGfxDeviceEventAfterReset = 3, +} UnityGfxDeviceEventType; + +typedef void (UNITY_INTERFACE_API * IUnityGraphicsDeviceEventCallback)(UnityGfxDeviceEventType eventType); + +// Should only be used on the rendering thread unless noted otherwise. +UNITY_DECLARE_INTERFACE(IUnityGraphics) +{ + UnityGfxRenderer(UNITY_INTERFACE_API * GetRenderer)(); // Thread safe + + // This callback will be called when graphics device is created, destroyed, reset, etc. + // It is possible to miss the kUnityGfxDeviceEventInitialize event in case plugin is loaded at a later time, + // when the graphics device is already created. + void(UNITY_INTERFACE_API * RegisterDeviceEventCallback)(IUnityGraphicsDeviceEventCallback callback); + void(UNITY_INTERFACE_API * UnregisterDeviceEventCallback)(IUnityGraphicsDeviceEventCallback callback); + int(UNITY_INTERFACE_API * ReserveEventIDRange)(int count); // reserves 'count' event IDs. Plugins should use the result as a base index when issuing events back and forth to avoid event id clashes. +}; +UNITY_REGISTER_INTERFACE_GUID(0x7CBA0A9CA4DDB544ULL, 0x8C5AD4926EB17B11ULL, IUnityGraphics) + + +// Certain Unity APIs (GL.IssuePluginEvent, CommandBuffer.IssuePluginEvent) can callback into native plugins. +// Provide them with an address to a function of this signature. +typedef void (UNITY_INTERFACE_API * UnityRenderingEvent)(int eventId); +typedef void (UNITY_INTERFACE_API * UnityRenderingEventAndData)(int eventId, void* data); diff --git a/Assets/Plugins/iOS/IUnityGraphics.h.meta b/Packages/com.unity.render-pipelines.universal@14.0.11/Runtime/Plugins/iOS/IUnityGraphics.h.meta similarity index 100% rename from Assets/Plugins/iOS/IUnityGraphics.h.meta rename to Packages/com.unity.render-pipelines.universal@14.0.11/Runtime/Plugins/iOS/IUnityGraphics.h.meta diff --git a/Assets/Plugins/iOS/RegisterPlugin.mm b/Packages/com.unity.render-pipelines.universal@14.0.11/Runtime/Plugins/iOS/RegisterPlugin.mm similarity index 96% rename from Assets/Plugins/iOS/RegisterPlugin.mm rename to Packages/com.unity.render-pipelines.universal@14.0.11/Runtime/Plugins/iOS/RegisterPlugin.mm index d96880c..c4bc091 100644 --- a/Assets/Plugins/iOS/RegisterPlugin.mm +++ b/Packages/com.unity.render-pipelines.universal@14.0.11/Runtime/Plugins/iOS/RegisterPlugin.mm @@ -1,21 +1,21 @@ -#import "UnityAppController.h" -#include "IUnityGraphics.h" - -extern "C" void UNITY_INTERFACE_EXPORT UNITY_INTERFACE_API UnityPluginLoad(IUnityInterfaces* unityInterfaces); -extern "C" void UNITY_INTERFACE_EXPORT UNITY_INTERFACE_API UnityPluginUnload(); - -@interface MyAppController : UnityAppController -{ -} -- (void)shouldAttachRenderDelegate; -@end -@implementation MyAppController -- (void)shouldAttachRenderDelegate -{ - // unlike desktops where plugin dynamic library is automatically loaded and registered - // we need to do that manually on iOS - UnityRegisterRenderingPluginV5(&UnityPluginLoad, &UnityPluginUnload); -} - -@end -IMPL_APP_CONTROLLER_SUBCLASS(MyAppController); +#import "UnityAppController.h" +#include "IUnityGraphics.h" + +extern "C" void UNITY_INTERFACE_EXPORT UNITY_INTERFACE_API UnityPluginLoad(IUnityInterfaces* unityInterfaces); +extern "C" void UNITY_INTERFACE_EXPORT UNITY_INTERFACE_API UnityPluginUnload(); + +@interface MyAppController : UnityAppController +{ +} +- (void)shouldAttachRenderDelegate; +@end +@implementation MyAppController +- (void)shouldAttachRenderDelegate +{ + // unlike desktops where plugin dynamic library is automatically loaded and registered + // we need to do that manually on iOS + UnityRegisterRenderingPluginV5(&UnityPluginLoad, &UnityPluginUnload); +} + +@end +IMPL_APP_CONTROLLER_SUBCLASS(MyAppController); diff --git a/Assets/Plugins/iOS/RegisterPlugin.mm.meta b/Packages/com.unity.render-pipelines.universal@14.0.11/Runtime/Plugins/iOS/RegisterPlugin.mm.meta similarity index 100% rename from Assets/Plugins/iOS/RegisterPlugin.mm.meta rename to Packages/com.unity.render-pipelines.universal@14.0.11/Runtime/Plugins/iOS/RegisterPlugin.mm.meta diff --git a/Assets/Plugins/iOS/libGfxPluginNativeRender.a b/Packages/com.unity.render-pipelines.universal@14.0.11/Runtime/Plugins/iOS/libGfxPluginNativeRender.a similarity index 100% rename from Assets/Plugins/iOS/libGfxPluginNativeRender.a rename to Packages/com.unity.render-pipelines.universal@14.0.11/Runtime/Plugins/iOS/libGfxPluginNativeRender.a diff --git a/Assets/Plugins/iOS/libGfxPluginNativeRender.a.meta b/Packages/com.unity.render-pipelines.universal@14.0.11/Runtime/Plugins/iOS/libGfxPluginNativeRender.a.meta similarity index 100% rename from Assets/Plugins/iOS/libGfxPluginNativeRender.a.meta rename to Packages/com.unity.render-pipelines.universal@14.0.11/Runtime/Plugins/iOS/libGfxPluginNativeRender.a.meta 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 cd13b3a..7732eda 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 @@ -48,11 +48,11 @@ namespace X.Rendering.Feature public float JitterScaleY; public float ExposureScale; - - [Range(-5,5)] - public float MipMapBias; + }; + + [StructLayout(LayoutKind.Sequential)] unsafe struct Xess1ExecParam { @@ -73,7 +73,12 @@ namespace X.Rendering.Feature [SerializeField] Xess1ConfigParam xess1ConfigParam; - + [Range(-5, 5)] + public float MipMapBias; + + [Range(0, 1)] + public float antiGhosting; + private bool needTurnOnXess = false; private bool needTurnOffXess = false; IntPtr xess1ExecParamPtr; @@ -153,8 +158,9 @@ namespace X.Rendering.Feature } SuperResolutionParamSets.Instance.Set("NeedJitter", true); - SuperResolutionParamSets.Instance.Set("MipmapBias", xess1ConfigParam.MipMapBias); + SuperResolutionParamSets.Instance.Set("MipmapBias", MipMapBias); SuperResolutionParamSets.Instance.Set("JitterScale", xess1ConfigParam.JitterScaleX); + SuperResolutionParamSets.Instance.Set("AntiGhosting", antiGhosting); var jitter = TemporalAA.CurrentJitter; 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 65596ae..6a5c1cd 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 @@ -341,7 +341,17 @@ namespace UnityEngine.Rendering.Universal // 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; + float antiGhosting = 0; + SuperResolutionParamSets.Instance.Get("AntiGhosting", ref antiGhosting); + if (antiGhosting > 0.0f) + { + jitterX += Random.Range(-0.1f * antiGhosting, 0.1f * antiGhosting); + jitterY += Random.Range(-0.1f * antiGhosting, 0.1f * antiGhosting); + + jitterX = Mathf.Clamp(jitterX, -0.5f, 0.5f); + jitterY = Mathf.Clamp(jitterY, -0.5f, 0.5f); + } return new Vector2(jitterX, jitterY); } diff --git a/UserSettings/EditorUserSettings.asset b/UserSettings/EditorUserSettings.asset index e8526a7..f62c9b3 100644 --- a/UserSettings/EditorUserSettings.asset +++ b/UserSettings/EditorUserSettings.asset @@ -15,10 +15,10 @@ EditorUserSettings: value: 5b00515154055e035459547042705a44154f1e2c2e2e7f677e7d4567e1b9376d flags: 0 RecentlyUsedSceneGuid-3: - value: 57050d5004060d590f56087046700f4445164c7e7a7824312e7c4e6bb0e1376d + value: 5a57555407545f0b5e0f5f764277594914161e2b787977692b714e64e4b2363b flags: 0 RecentlyUsedSceneGuid-4: - value: 5a57555407545f0b5e0f5f764277594914161e2b787977692b714e64e4b2363b + value: 57050d5004060d590f56087046700f4445164c7e7a7824312e7c4e6bb0e1376d flags: 0 vcSharedLogLevel: value: 0d5e400f0650