336 changed files with 8846 additions and 9239 deletions
-
23Assets/Fsr3UpscalerAssets.asset
-
8Assets/Fsr3UpscalerAssets.asset.meta
-
8Assets/Resources/FSR2/ffx_fsr2_lock_pass.compute.meta
-
8Assets/Resources/FSR2/ffx_fsr2_rcas_pass.compute.meta
-
8Assets/Resources/FSR2/ffx_fsr2_reconstruct_previous_depth_pass.compute.meta
-
8Assets/Resources/FSR2/ffx_fsr2_tcr_autogen_pass.compute.meta
-
60Assets/Resources/FSR2/shaders/ffx_common_types.h.meta
-
60Assets/Resources/FSR2/shaders/ffx_core.h.meta
-
60Assets/Resources/FSR2/shaders/ffx_core_cpu.h.meta
-
60Assets/Resources/FSR2/shaders/ffx_core_gpu_common.h.meta
-
60Assets/Resources/FSR2/shaders/ffx_core_gpu_common_half.h.meta
-
60Assets/Resources/FSR2/shaders/ffx_core_hlsl.h.meta
-
60Assets/Resources/FSR2/shaders/ffx_core_portability.h.meta
-
60Assets/Resources/FSR2/shaders/ffx_fsr1.h.meta
-
60Assets/Resources/FSR2/shaders/ffx_fsr2_accumulate.h.meta
-
78Assets/Resources/FSR2/shaders/ffx_fsr2_accumulate_pass.hlsl
-
85Assets/Resources/FSR2/shaders/ffx_fsr2_autogen_reactive_pass.hlsl
-
817Assets/Resources/FSR2/shaders/ffx_fsr2_callbacks_hlsl.h
-
60Assets/Resources/FSR2/shaders/ffx_fsr2_callbacks_hlsl.h.meta
-
60Assets/Resources/FSR2/shaders/ffx_fsr2_common.h.meta
-
60Assets/Resources/FSR2/shaders/ffx_fsr2_compute_luminance_pyramid.h.meta
-
131Assets/Resources/FSR2/shaders/ffx_fsr2_compute_luminance_pyramid_pass.hlsl
-
60Assets/Resources/FSR2/shaders/ffx_fsr2_depth_clip.h.meta
-
66Assets/Resources/FSR2/shaders/ffx_fsr2_depth_clip_pass.hlsl
-
60Assets/Resources/FSR2/shaders/ffx_fsr2_lock.h.meta
-
53Assets/Resources/FSR2/shaders/ffx_fsr2_lock_pass.hlsl
-
7Assets/Resources/FSR2/shaders/ffx_fsr2_lock_pass.hlsl.meta
-
60Assets/Resources/FSR2/shaders/ffx_fsr2_postprocess_lock_status.h.meta
-
60Assets/Resources/FSR2/shaders/ffx_fsr2_rcas.h.meta
-
75Assets/Resources/FSR2/shaders/ffx_fsr2_rcas_pass.hlsl
-
7Assets/Resources/FSR2/shaders/ffx_fsr2_rcas_pass.hlsl.meta
-
60Assets/Resources/FSR2/shaders/ffx_fsr2_reconstruct_dilated_velocity_and_previous_depth.h.meta
-
63Assets/Resources/FSR2/shaders/ffx_fsr2_reconstruct_previous_depth_pass.hlsl
-
7Assets/Resources/FSR2/shaders/ffx_fsr2_reconstruct_previous_depth_pass.hlsl.meta
-
60Assets/Resources/FSR2/shaders/ffx_fsr2_reproject.h.meta
-
105Assets/Resources/FSR2/shaders/ffx_fsr2_resources.h
-
60Assets/Resources/FSR2/shaders/ffx_fsr2_resources.h.meta
-
60Assets/Resources/FSR2/shaders/ffx_fsr2_sample.h.meta
-
60Assets/Resources/FSR2/shaders/ffx_fsr2_tcr_autogen.h.meta
-
7Assets/Resources/FSR2/shaders/ffx_fsr2_tcr_autogen_pass.hlsl.meta
-
60Assets/Resources/FSR2/shaders/ffx_fsr2_upsample.h.meta
-
60Assets/Resources/FSR2/shaders/ffx_spd.h.meta
-
4Assets/Scenes/SampleScene.unity
-
10Assets/Scenes/SampleScenePPV2.unity
-
8Assets/Scripts/Core/Fsr3ShaderIDs.cs
-
0Assets/Scripts/Core/Fsr3ShaderIDs.cs.meta
-
100Assets/Scripts/Core/Fsr3Upscaler.cs
-
0Assets/Scripts/Core/Fsr3Upscaler.cs.meta
-
151Assets/Scripts/Core/Fsr3UpscalerAssets.cs
-
2Assets/Scripts/Core/Fsr3UpscalerAssets.cs.meta
-
35Assets/Scripts/Core/Fsr3UpscalerCallbacks.cs
-
0Assets/Scripts/Core/Fsr3UpscalerCallbacks.cs.meta
-
214Assets/Scripts/Core/Fsr3UpscalerContext.cs
-
0Assets/Scripts/Core/Fsr3UpscalerContext.cs.meta
-
276Assets/Scripts/Core/Fsr3UpscalerPass.cs
-
0Assets/Scripts/Core/Fsr3UpscalerPass.cs.meta
-
110Assets/Scripts/Core/Fsr3UpscalerResources.cs
-
0Assets/Scripts/Core/Fsr3UpscalerResources.cs.meta
-
146Assets/Scripts/Fsr3UpscalerImageEffect.cs
-
0Assets/Scripts/Fsr3UpscalerImageEffect.cs.meta
-
18Assets/Scripts/Fsr3UpscalerImageEffectHelper.cs
-
0Assets/Scripts/Fsr3UpscalerImageEffectHelper.cs.meta
-
0Assets/Shaders.meta
-
2Assets/Shaders/FSR3.meta
-
24Assets/Shaders/FSR3/ffx_fsr3upscaler_accumulate_pass.compute
-
2Assets/Shaders/FSR3/ffx_fsr3upscaler_accumulate_pass.compute.meta
-
32Assets/Shaders/FSR3/ffx_fsr3upscaler_autogen_reactive_pass.compute
-
2Assets/Shaders/FSR3/ffx_fsr3upscaler_autogen_reactive_pass.compute.meta
-
16Assets/Shaders/FSR3/ffx_fsr3upscaler_compute_luminance_pyramid_pass.compute
-
2Assets/Shaders/FSR3/ffx_fsr3upscaler_compute_luminance_pyramid_pass.compute.meta
-
12Assets/Shaders/FSR3/ffx_fsr3upscaler_depth_clip_pass.compute
-
2Assets/Shaders/FSR3/ffx_fsr3upscaler_depth_clip_pass.compute.meta
-
10Assets/Shaders/FSR3/ffx_fsr3upscaler_lock_pass.compute
-
8Assets/Shaders/FSR3/ffx_fsr3upscaler_lock_pass.compute.meta
-
10Assets/Shaders/FSR3/ffx_fsr3upscaler_rcas_pass.compute
-
8Assets/Shaders/FSR3/ffx_fsr3upscaler_rcas_pass.compute.meta
-
14Assets/Shaders/FSR3/ffx_fsr3upscaler_reconstruct_previous_depth_pass.compute
-
8Assets/Shaders/FSR3/ffx_fsr3upscaler_reconstruct_previous_depth_pass.compute.meta
-
12Assets/Shaders/FSR3/ffx_fsr3upscaler_tcr_autogen_pass.compute
-
8Assets/Shaders/FSR3/ffx_fsr3upscaler_tcr_autogen_pass.compute.meta
-
11Assets/Shaders/FSR3/ffx_fsr3upscaler_unity_common.cginc
-
2Assets/Shaders/FSR3/ffx_fsr3upscaler_unity_common.cginc.meta
-
2Assets/Shaders/FSR3/shaders.meta
-
79Assets/Shaders/FSR3/shaders/ffx_fsr3upscaler_accumulate_pass.hlsl
-
2Assets/Shaders/FSR3/shaders/ffx_fsr3upscaler_accumulate_pass.hlsl.meta
-
77Assets/Shaders/FSR3/shaders/ffx_fsr3upscaler_autogen_reactive_pass.hlsl
-
2Assets/Shaders/FSR3/shaders/ffx_fsr3upscaler_autogen_reactive_pass.hlsl.meta
-
55Assets/Shaders/FSR3/shaders/ffx_fsr3upscaler_compute_luminance_pyramid_pass.hlsl
-
2Assets/Shaders/FSR3/shaders/ffx_fsr3upscaler_compute_luminance_pyramid_pass.hlsl.meta
-
67Assets/Shaders/FSR3/shaders/ffx_fsr3upscaler_depth_clip_pass.hlsl
-
7Assets/Shaders/FSR3/shaders/ffx_fsr3upscaler_depth_clip_pass.hlsl.meta
-
56Assets/Shaders/FSR3/shaders/ffx_fsr3upscaler_lock_pass.hlsl
-
7Assets/Shaders/FSR3/shaders/ffx_fsr3upscaler_lock_pass.hlsl.meta
-
53Assets/Shaders/FSR3/shaders/ffx_fsr3upscaler_rcas_pass.hlsl
-
7Assets/Shaders/FSR3/shaders/ffx_fsr3upscaler_rcas_pass.hlsl.meta
-
64Assets/Shaders/FSR3/shaders/ffx_fsr3upscaler_reconstruct_previous_depth_pass.hlsl
-
7Assets/Shaders/FSR3/shaders/ffx_fsr3upscaler_reconstruct_previous_depth_pass.hlsl.meta
-
96Assets/Shaders/FSR3/shaders/ffx_fsr3upscaler_tcr_autogen_pass.hlsl
-
7Assets/Shaders/FSR3/shaders/ffx_fsr3upscaler_tcr_autogen_pass.hlsl.meta
-
2Assets/Shaders/FSR3/shaders/fsr3upscaler.meta
@ -0,0 +1,23 @@ |
|||||
|
%YAML 1.1 |
||||
|
%TAG !u! tag:unity3d.com,2011: |
||||
|
--- !u!114 &11400000 |
||||
|
MonoBehaviour: |
||||
|
m_ObjectHideFlags: 0 |
||||
|
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: 11500000, guid: db26e15a33db6ab42a38daab0ba2712f, type: 3} |
||||
|
m_Name: Fsr3UpscalerAssets |
||||
|
m_EditorClassIdentifier: |
||||
|
shaders: |
||||
|
computeLuminancePyramidPass: {fileID: 7200000, guid: d253be05abcdc80428503d3e4cce3a36, type: 3} |
||||
|
reconstructPreviousDepthPass: {fileID: 7200000, guid: 4f59e5b9179d74844ae06a30ae1e0629, type: 3} |
||||
|
depthClipPass: {fileID: 7200000, guid: 20e44016ed34b0d4b8de499d1b566c69, type: 3} |
||||
|
lockPass: {fileID: 7200000, guid: a135306e6d1857e43a86ef20db2a47fe, type: 3} |
||||
|
accumulatePass: {fileID: 7200000, guid: c9b45f0ae7673694ba57a4aadfe212e9, type: 3} |
||||
|
sharpenPass: {fileID: 7200000, guid: 7aaf5cfff022de2499e9b0412f947f6c, type: 3} |
||||
|
autoGenReactivePass: {fileID: 7200000, guid: 5716b91fdaa4e9e439df6b96a796fe6e, type: 3} |
||||
|
tcrAutoGenPass: {fileID: 7200000, guid: 75cdc6ef23f08ed498d4da511923fcea, type: 3} |
||||
@ -0,0 +1,8 @@ |
|||||
|
fileFormatVersion: 2 |
||||
|
guid: 4151befafd86e8740ab09463b4f1bdbb |
||||
|
NativeFormatImporter: |
||||
|
externalObjects: {} |
||||
|
mainObjectFileID: 11400000 |
||||
|
userData: |
||||
|
assetBundleName: |
||||
|
assetBundleVariant: |
||||
@ -1,8 +0,0 @@ |
|||||
fileFormatVersion: 2 |
|
||||
guid: 3c96d72b39a840c428c901628dab92c0 |
|
||||
ComputeShaderImporter: |
|
||||
externalObjects: {} |
|
||||
preprocessorOverride: 0 |
|
||||
userData: |
|
||||
assetBundleName: |
|
||||
assetBundleVariant: |
|
||||
@ -1,8 +0,0 @@ |
|||||
fileFormatVersion: 2 |
|
||||
guid: 5a82801f160ff6a4eb47db567216e592 |
|
||||
ComputeShaderImporter: |
|
||||
externalObjects: {} |
|
||||
preprocessorOverride: 0 |
|
||||
userData: |
|
||||
assetBundleName: |
|
||||
assetBundleVariant: |
|
||||
@ -1,8 +0,0 @@ |
|||||
fileFormatVersion: 2 |
|
||||
guid: 6ef1b4c25874e334dad5ba3ac6345e32 |
|
||||
ComputeShaderImporter: |
|
||||
externalObjects: {} |
|
||||
preprocessorOverride: 0 |
|
||||
userData: |
|
||||
assetBundleName: |
|
||||
assetBundleVariant: |
|
||||
@ -1,8 +0,0 @@ |
|||||
fileFormatVersion: 2 |
|
||||
guid: b478fba0a6a87b44b8be7c35deb5f0dc |
|
||||
ComputeShaderImporter: |
|
||||
externalObjects: {} |
|
||||
preprocessorOverride: 0 |
|
||||
userData: |
|
||||
assetBundleName: |
|
||||
assetBundleVariant: |
|
||||
@ -1,60 +0,0 @@ |
|||||
fileFormatVersion: 2 |
|
||||
guid: c6da07d8aae05f04f87e4db20f84c73e |
|
||||
PluginImporter: |
|
||||
externalObjects: {} |
|
||||
serializedVersion: 2 |
|
||||
iconMap: {} |
|
||||
executionOrder: {} |
|
||||
defineConstraints: [] |
|
||||
isPreloaded: 0 |
|
||||
isOverridable: 0 |
|
||||
isExplicitlyReferenced: 0 |
|
||||
validateReferences: 1 |
|
||||
platformData: |
|
||||
- first: |
|
||||
: Any |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: |
|
||||
Exclude Editor: 1 |
|
||||
Exclude GameCoreScarlett: 1 |
|
||||
Exclude GameCoreXboxOne: 1 |
|
||||
Exclude Linux64: 1 |
|
||||
Exclude OSXUniversal: 1 |
|
||||
Exclude PS4: 1 |
|
||||
Exclude PS5: 1 |
|
||||
Exclude WebGL: 1 |
|
||||
Exclude Win: 1 |
|
||||
Exclude Win64: 1 |
|
||||
- first: |
|
||||
Any: |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: {} |
|
||||
- first: |
|
||||
Editor: Editor |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: |
|
||||
DefaultValueInitialized: true |
|
||||
- first: |
|
||||
Standalone: Linux64 |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: |
|
||||
CPU: None |
|
||||
- first: |
|
||||
Standalone: Win |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: |
|
||||
CPU: None |
|
||||
- first: |
|
||||
Standalone: Win64 |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: |
|
||||
CPU: None |
|
||||
userData: |
|
||||
assetBundleName: |
|
||||
assetBundleVariant: |
|
||||
@ -1,60 +0,0 @@ |
|||||
fileFormatVersion: 2 |
|
||||
guid: b37eb663a0ae01b469b0b5a54365b301 |
|
||||
PluginImporter: |
|
||||
externalObjects: {} |
|
||||
serializedVersion: 2 |
|
||||
iconMap: {} |
|
||||
executionOrder: {} |
|
||||
defineConstraints: [] |
|
||||
isPreloaded: 0 |
|
||||
isOverridable: 0 |
|
||||
isExplicitlyReferenced: 0 |
|
||||
validateReferences: 1 |
|
||||
platformData: |
|
||||
- first: |
|
||||
: Any |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: |
|
||||
Exclude Editor: 1 |
|
||||
Exclude GameCoreScarlett: 1 |
|
||||
Exclude GameCoreXboxOne: 1 |
|
||||
Exclude Linux64: 1 |
|
||||
Exclude OSXUniversal: 1 |
|
||||
Exclude PS4: 1 |
|
||||
Exclude PS5: 1 |
|
||||
Exclude WebGL: 1 |
|
||||
Exclude Win: 1 |
|
||||
Exclude Win64: 1 |
|
||||
- first: |
|
||||
Any: |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: {} |
|
||||
- first: |
|
||||
Editor: Editor |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: |
|
||||
DefaultValueInitialized: true |
|
||||
- first: |
|
||||
Standalone: Linux64 |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: |
|
||||
CPU: None |
|
||||
- first: |
|
||||
Standalone: Win |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: |
|
||||
CPU: None |
|
||||
- first: |
|
||||
Standalone: Win64 |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: |
|
||||
CPU: None |
|
||||
userData: |
|
||||
assetBundleName: |
|
||||
assetBundleVariant: |
|
||||
@ -1,60 +0,0 @@ |
|||||
fileFormatVersion: 2 |
|
||||
guid: 9d1d6ed5c9da0c64b882f3ebc2bac307 |
|
||||
PluginImporter: |
|
||||
externalObjects: {} |
|
||||
serializedVersion: 2 |
|
||||
iconMap: {} |
|
||||
executionOrder: {} |
|
||||
defineConstraints: [] |
|
||||
isPreloaded: 0 |
|
||||
isOverridable: 0 |
|
||||
isExplicitlyReferenced: 0 |
|
||||
validateReferences: 1 |
|
||||
platformData: |
|
||||
- first: |
|
||||
: Any |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: |
|
||||
Exclude Editor: 1 |
|
||||
Exclude GameCoreScarlett: 1 |
|
||||
Exclude GameCoreXboxOne: 1 |
|
||||
Exclude Linux64: 1 |
|
||||
Exclude OSXUniversal: 1 |
|
||||
Exclude PS4: 1 |
|
||||
Exclude PS5: 1 |
|
||||
Exclude WebGL: 1 |
|
||||
Exclude Win: 1 |
|
||||
Exclude Win64: 1 |
|
||||
- first: |
|
||||
Any: |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: {} |
|
||||
- first: |
|
||||
Editor: Editor |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: |
|
||||
DefaultValueInitialized: true |
|
||||
- first: |
|
||||
Standalone: Linux64 |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: |
|
||||
CPU: None |
|
||||
- first: |
|
||||
Standalone: Win |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: |
|
||||
CPU: None |
|
||||
- first: |
|
||||
Standalone: Win64 |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: |
|
||||
CPU: None |
|
||||
userData: |
|
||||
assetBundleName: |
|
||||
assetBundleVariant: |
|
||||
@ -1,60 +0,0 @@ |
|||||
fileFormatVersion: 2 |
|
||||
guid: 402c509393f5bf647b41a962a48ed8e2 |
|
||||
PluginImporter: |
|
||||
externalObjects: {} |
|
||||
serializedVersion: 2 |
|
||||
iconMap: {} |
|
||||
executionOrder: {} |
|
||||
defineConstraints: [] |
|
||||
isPreloaded: 0 |
|
||||
isOverridable: 0 |
|
||||
isExplicitlyReferenced: 0 |
|
||||
validateReferences: 1 |
|
||||
platformData: |
|
||||
- first: |
|
||||
: Any |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: |
|
||||
Exclude Editor: 1 |
|
||||
Exclude GameCoreScarlett: 1 |
|
||||
Exclude GameCoreXboxOne: 1 |
|
||||
Exclude Linux64: 1 |
|
||||
Exclude OSXUniversal: 1 |
|
||||
Exclude PS4: 1 |
|
||||
Exclude PS5: 1 |
|
||||
Exclude WebGL: 1 |
|
||||
Exclude Win: 1 |
|
||||
Exclude Win64: 1 |
|
||||
- first: |
|
||||
Any: |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: {} |
|
||||
- first: |
|
||||
Editor: Editor |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: |
|
||||
DefaultValueInitialized: true |
|
||||
- first: |
|
||||
Standalone: Linux64 |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: |
|
||||
CPU: None |
|
||||
- first: |
|
||||
Standalone: Win |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: |
|
||||
CPU: None |
|
||||
- first: |
|
||||
Standalone: Win64 |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: |
|
||||
CPU: None |
|
||||
userData: |
|
||||
assetBundleName: |
|
||||
assetBundleVariant: |
|
||||
@ -1,60 +0,0 @@ |
|||||
fileFormatVersion: 2 |
|
||||
guid: 142bf3947ada43541a0f31a328fdec07 |
|
||||
PluginImporter: |
|
||||
externalObjects: {} |
|
||||
serializedVersion: 2 |
|
||||
iconMap: {} |
|
||||
executionOrder: {} |
|
||||
defineConstraints: [] |
|
||||
isPreloaded: 0 |
|
||||
isOverridable: 0 |
|
||||
isExplicitlyReferenced: 0 |
|
||||
validateReferences: 1 |
|
||||
platformData: |
|
||||
- first: |
|
||||
: Any |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: |
|
||||
Exclude Editor: 1 |
|
||||
Exclude GameCoreScarlett: 1 |
|
||||
Exclude GameCoreXboxOne: 1 |
|
||||
Exclude Linux64: 1 |
|
||||
Exclude OSXUniversal: 1 |
|
||||
Exclude PS4: 1 |
|
||||
Exclude PS5: 1 |
|
||||
Exclude WebGL: 1 |
|
||||
Exclude Win: 1 |
|
||||
Exclude Win64: 1 |
|
||||
- first: |
|
||||
Any: |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: {} |
|
||||
- first: |
|
||||
Editor: Editor |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: |
|
||||
DefaultValueInitialized: true |
|
||||
- first: |
|
||||
Standalone: Linux64 |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: |
|
||||
CPU: None |
|
||||
- first: |
|
||||
Standalone: Win |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: |
|
||||
CPU: None |
|
||||
- first: |
|
||||
Standalone: Win64 |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: |
|
||||
CPU: None |
|
||||
userData: |
|
||||
assetBundleName: |
|
||||
assetBundleVariant: |
|
||||
@ -1,60 +0,0 @@ |
|||||
fileFormatVersion: 2 |
|
||||
guid: 89d6e02f97594f64ca2da4c8124df6cf |
|
||||
PluginImporter: |
|
||||
externalObjects: {} |
|
||||
serializedVersion: 2 |
|
||||
iconMap: {} |
|
||||
executionOrder: {} |
|
||||
defineConstraints: [] |
|
||||
isPreloaded: 0 |
|
||||
isOverridable: 0 |
|
||||
isExplicitlyReferenced: 0 |
|
||||
validateReferences: 1 |
|
||||
platformData: |
|
||||
- first: |
|
||||
: Any |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: |
|
||||
Exclude Editor: 1 |
|
||||
Exclude GameCoreScarlett: 1 |
|
||||
Exclude GameCoreXboxOne: 1 |
|
||||
Exclude Linux64: 1 |
|
||||
Exclude OSXUniversal: 1 |
|
||||
Exclude PS4: 1 |
|
||||
Exclude PS5: 1 |
|
||||
Exclude WebGL: 1 |
|
||||
Exclude Win: 1 |
|
||||
Exclude Win64: 1 |
|
||||
- first: |
|
||||
Any: |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: {} |
|
||||
- first: |
|
||||
Editor: Editor |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: |
|
||||
DefaultValueInitialized: true |
|
||||
- first: |
|
||||
Standalone: Linux64 |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: |
|
||||
CPU: None |
|
||||
- first: |
|
||||
Standalone: Win |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: |
|
||||
CPU: None |
|
||||
- first: |
|
||||
Standalone: Win64 |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: |
|
||||
CPU: None |
|
||||
userData: |
|
||||
assetBundleName: |
|
||||
assetBundleVariant: |
|
||||
@ -1,60 +0,0 @@ |
|||||
fileFormatVersion: 2 |
|
||||
guid: 5d6e692075988194382122bac7819f02 |
|
||||
PluginImporter: |
|
||||
externalObjects: {} |
|
||||
serializedVersion: 2 |
|
||||
iconMap: {} |
|
||||
executionOrder: {} |
|
||||
defineConstraints: [] |
|
||||
isPreloaded: 0 |
|
||||
isOverridable: 0 |
|
||||
isExplicitlyReferenced: 0 |
|
||||
validateReferences: 1 |
|
||||
platformData: |
|
||||
- first: |
|
||||
: Any |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: |
|
||||
Exclude Editor: 1 |
|
||||
Exclude GameCoreScarlett: 1 |
|
||||
Exclude GameCoreXboxOne: 1 |
|
||||
Exclude Linux64: 1 |
|
||||
Exclude OSXUniversal: 1 |
|
||||
Exclude PS4: 1 |
|
||||
Exclude PS5: 1 |
|
||||
Exclude WebGL: 1 |
|
||||
Exclude Win: 1 |
|
||||
Exclude Win64: 1 |
|
||||
- first: |
|
||||
Any: |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: {} |
|
||||
- first: |
|
||||
Editor: Editor |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: |
|
||||
DefaultValueInitialized: true |
|
||||
- first: |
|
||||
Standalone: Linux64 |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: |
|
||||
CPU: None |
|
||||
- first: |
|
||||
Standalone: Win |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: |
|
||||
CPU: None |
|
||||
- first: |
|
||||
Standalone: Win64 |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: |
|
||||
CPU: None |
|
||||
userData: |
|
||||
assetBundleName: |
|
||||
assetBundleVariant: |
|
||||
@ -1,60 +0,0 @@ |
|||||
fileFormatVersion: 2 |
|
||||
guid: 7524e42f73f97f34bbeb414ea412a808 |
|
||||
PluginImporter: |
|
||||
externalObjects: {} |
|
||||
serializedVersion: 2 |
|
||||
iconMap: {} |
|
||||
executionOrder: {} |
|
||||
defineConstraints: [] |
|
||||
isPreloaded: 0 |
|
||||
isOverridable: 0 |
|
||||
isExplicitlyReferenced: 0 |
|
||||
validateReferences: 1 |
|
||||
platformData: |
|
||||
- first: |
|
||||
: Any |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: |
|
||||
Exclude Editor: 1 |
|
||||
Exclude GameCoreScarlett: 1 |
|
||||
Exclude GameCoreXboxOne: 1 |
|
||||
Exclude Linux64: 1 |
|
||||
Exclude OSXUniversal: 1 |
|
||||
Exclude PS4: 1 |
|
||||
Exclude PS5: 1 |
|
||||
Exclude WebGL: 1 |
|
||||
Exclude Win: 1 |
|
||||
Exclude Win64: 1 |
|
||||
- first: |
|
||||
Any: |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: {} |
|
||||
- first: |
|
||||
Editor: Editor |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: |
|
||||
DefaultValueInitialized: true |
|
||||
- first: |
|
||||
Standalone: Linux64 |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: |
|
||||
CPU: None |
|
||||
- first: |
|
||||
Standalone: Win |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: |
|
||||
CPU: None |
|
||||
- first: |
|
||||
Standalone: Win64 |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: |
|
||||
CPU: None |
|
||||
userData: |
|
||||
assetBundleName: |
|
||||
assetBundleVariant: |
|
||||
@ -1,60 +0,0 @@ |
|||||
fileFormatVersion: 2 |
|
||||
guid: a04cb2522aaff1045869a272ed129964 |
|
||||
PluginImporter: |
|
||||
externalObjects: {} |
|
||||
serializedVersion: 2 |
|
||||
iconMap: {} |
|
||||
executionOrder: {} |
|
||||
defineConstraints: [] |
|
||||
isPreloaded: 0 |
|
||||
isOverridable: 0 |
|
||||
isExplicitlyReferenced: 0 |
|
||||
validateReferences: 1 |
|
||||
platformData: |
|
||||
- first: |
|
||||
: Any |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: |
|
||||
Exclude Editor: 1 |
|
||||
Exclude GameCoreScarlett: 1 |
|
||||
Exclude GameCoreXboxOne: 1 |
|
||||
Exclude Linux64: 1 |
|
||||
Exclude OSXUniversal: 1 |
|
||||
Exclude PS4: 1 |
|
||||
Exclude PS5: 1 |
|
||||
Exclude WebGL: 1 |
|
||||
Exclude Win: 1 |
|
||||
Exclude Win64: 1 |
|
||||
- first: |
|
||||
Any: |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: {} |
|
||||
- first: |
|
||||
Editor: Editor |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: |
|
||||
DefaultValueInitialized: true |
|
||||
- first: |
|
||||
Standalone: Linux64 |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: |
|
||||
CPU: None |
|
||||
- first: |
|
||||
Standalone: Win |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: |
|
||||
CPU: None |
|
||||
- first: |
|
||||
Standalone: Win64 |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: |
|
||||
CPU: None |
|
||||
userData: |
|
||||
assetBundleName: |
|
||||
assetBundleVariant: |
|
||||
@ -1,78 +0,0 @@ |
|||||
// This file is part of the FidelityFX SDK. |
|
||||
// |
|
||||
// Copyright (c) 2022-2023 Advanced Micro Devices, Inc. All rights reserved. |
|
||||
// |
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy |
|
||||
// of this software and associated documentation files (the "Software"), to deal |
|
||||
// in the Software without restriction, including without limitation the rights |
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
|
||||
// copies of the Software, and to permit persons to whom the Software is |
|
||||
// furnished to do so, subject to the following conditions: |
|
||||
// The above copyright notice and this permission notice shall be included in |
|
||||
// all copies or substantial portions of the Software. |
|
||||
// |
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
|
||||
// THE SOFTWARE. |
|
||||
|
|
||||
#define FSR2_BIND_SRV_INPUT_EXPOSURE 0 |
|
||||
#define FSR2_BIND_SRV_DILATED_REACTIVE_MASKS 1 |
|
||||
#if FFX_FSR2_OPTION_LOW_RESOLUTION_MOTION_VECTORS |
|
||||
#define FSR2_BIND_SRV_DILATED_MOTION_VECTORS 2 |
|
||||
#else |
|
||||
#define FSR2_BIND_SRV_INPUT_MOTION_VECTORS 2 |
|
||||
#endif |
|
||||
#define FSR2_BIND_SRV_INTERNAL_UPSCALED 3 |
|
||||
#define FSR2_BIND_SRV_LOCK_STATUS 4 |
|
||||
#define FSR2_BIND_SRV_PREPARED_INPUT_COLOR 5 |
|
||||
#define FSR2_BIND_SRV_LANCZOS_LUT 6 |
|
||||
#define FSR2_BIND_SRV_UPSCALE_MAXIMUM_BIAS_LUT 7 |
|
||||
#define FSR2_BIND_SRV_SCENE_LUMINANCE_MIPS 8 |
|
||||
#define FSR2_BIND_SRV_AUTO_EXPOSURE 9 |
|
||||
#define FSR2_BIND_SRV_LUMA_HISTORY 10 |
|
||||
|
|
||||
#define FSR2_BIND_UAV_INTERNAL_UPSCALED 0 |
|
||||
#define FSR2_BIND_UAV_LOCK_STATUS 1 |
|
||||
#define FSR2_BIND_UAV_UPSCALED_OUTPUT 2 |
|
||||
#define FSR2_BIND_UAV_NEW_LOCKS 3 |
|
||||
#define FSR2_BIND_UAV_LUMA_HISTORY 4 |
|
||||
|
|
||||
#define FSR2_BIND_CB_FSR2 0 |
|
||||
|
|
||||
#include "ffx_fsr2_callbacks_hlsl.h" |
|
||||
#include "ffx_fsr2_common.h" |
|
||||
#include "ffx_fsr2_sample.h" |
|
||||
#include "ffx_fsr2_upsample.h" |
|
||||
#include "ffx_fsr2_postprocess_lock_status.h" |
|
||||
#include "ffx_fsr2_reproject.h" |
|
||||
#include "ffx_fsr2_accumulate.h" |
|
||||
|
|
||||
#ifndef FFX_FSR2_THREAD_GROUP_WIDTH |
|
||||
#define FFX_FSR2_THREAD_GROUP_WIDTH 8 |
|
||||
#endif // #ifndef FFX_FSR2_THREAD_GROUP_WIDTH |
|
||||
#ifndef FFX_FSR2_THREAD_GROUP_HEIGHT |
|
||||
#define FFX_FSR2_THREAD_GROUP_HEIGHT 8 |
|
||||
#endif // FFX_FSR2_THREAD_GROUP_HEIGHT |
|
||||
#ifndef FFX_FSR2_THREAD_GROUP_DEPTH |
|
||||
#define FFX_FSR2_THREAD_GROUP_DEPTH 1 |
|
||||
#endif // #ifndef FFX_FSR2_THREAD_GROUP_DEPTH |
|
||||
#ifndef FFX_FSR2_NUM_THREADS |
|
||||
#define FFX_FSR2_NUM_THREADS [numthreads(FFX_FSR2_THREAD_GROUP_WIDTH, FFX_FSR2_THREAD_GROUP_HEIGHT, FFX_FSR2_THREAD_GROUP_DEPTH)] |
|
||||
#endif // #ifndef FFX_FSR2_NUM_THREADS |
|
||||
|
|
||||
FFX_FSR2_PREFER_WAVE64 |
|
||||
FFX_FSR2_NUM_THREADS |
|
||||
FFX_FSR2_EMBED_ROOTSIG_CONTENT |
|
||||
void CS(uint2 uGroupId : SV_GroupID, uint2 uGroupThreadId : SV_GroupThreadID) |
|
||||
{ |
|
||||
const uint GroupRows = (uint(DisplaySize().y) + FFX_FSR2_THREAD_GROUP_HEIGHT - 1) / FFX_FSR2_THREAD_GROUP_HEIGHT; |
|
||||
uGroupId.y = GroupRows - uGroupId.y - 1; |
|
||||
|
|
||||
uint2 uDispatchThreadId = uGroupId * uint2(FFX_FSR2_THREAD_GROUP_WIDTH, FFX_FSR2_THREAD_GROUP_HEIGHT) + uGroupThreadId; |
|
||||
|
|
||||
Accumulate(uDispatchThreadId); |
|
||||
} |
|
||||
@ -1,85 +0,0 @@ |
|||||
// This file is part of the FidelityFX SDK. |
|
||||
// |
|
||||
// Copyright (c) 2022-2023 Advanced Micro Devices, Inc. All rights reserved. |
|
||||
// |
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy |
|
||||
// of this software and associated documentation files (the "Software"), to deal |
|
||||
// in the Software without restriction, including without limitation the rights |
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
|
||||
// copies of the Software, and to permit persons to whom the Software is |
|
||||
// furnished to do so, subject to the following conditions: |
|
||||
// The above copyright notice and this permission notice shall be included in |
|
||||
// all copies or substantial portions of the Software. |
|
||||
// |
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
|
||||
// THE SOFTWARE. |
|
||||
|
|
||||
#define FSR2_BIND_SRV_INPUT_OPAQUE_ONLY 0 |
|
||||
#define FSR2_BIND_SRV_INPUT_COLOR 1 |
|
||||
#define FSR2_BIND_UAV_AUTOREACTIVE 0 |
|
||||
|
|
||||
#define FSR2_BIND_CB_FSR2 0 |
|
||||
#define FSR2_BIND_CB_REACTIVE 1 |
|
||||
|
|
||||
#include "ffx_fsr2_callbacks_hlsl.h" |
|
||||
#include "ffx_fsr2_common.h" |
|
||||
|
|
||||
#ifndef FFX_FSR2_THREAD_GROUP_WIDTH |
|
||||
#define FFX_FSR2_THREAD_GROUP_WIDTH 8 |
|
||||
#endif // #ifndef FFX_FSR2_THREAD_GROUP_WIDTH |
|
||||
#ifndef FFX_FSR2_THREAD_GROUP_HEIGHT |
|
||||
#define FFX_FSR2_THREAD_GROUP_HEIGHT 8 |
|
||||
#endif // FFX_FSR2_THREAD_GROUP_HEIGHT |
|
||||
#ifndef FFX_FSR2_THREAD_GROUP_DEPTH |
|
||||
#define FFX_FSR2_THREAD_GROUP_DEPTH 1 |
|
||||
#endif // #ifndef FFX_FSR2_THREAD_GROUP_DEPTH |
|
||||
#ifndef FFX_FSR2_NUM_THREADS |
|
||||
#define FFX_FSR2_NUM_THREADS [numthreads(FFX_FSR2_THREAD_GROUP_WIDTH, FFX_FSR2_THREAD_GROUP_HEIGHT, FFX_FSR2_THREAD_GROUP_DEPTH)] |
|
||||
#endif // #ifndef FFX_FSR2_NUM_THREADS |
|
||||
|
|
||||
#if defined(FSR2_BIND_CB_REACTIVE) |
|
||||
cbuffer cbGenerateReactive : FFX_FSR2_DECLARE_CB(FSR2_BIND_CB_REACTIVE) |
|
||||
{ |
|
||||
float scale; |
|
||||
float threshold; |
|
||||
float binaryValue; |
|
||||
uint flags; |
|
||||
}; |
|
||||
#endif |
|
||||
|
|
||||
FFX_FSR2_NUM_THREADS |
|
||||
FFX_FSR2_EMBED_ROOTSIG_CONTENT |
|
||||
void CS(uint2 uGroupId : SV_GroupID, uint2 uGroupThreadId : SV_GroupThreadID) |
|
||||
{ |
|
||||
uint2 uDispatchThreadId = uGroupId * uint2(FFX_FSR2_THREAD_GROUP_WIDTH, FFX_FSR2_THREAD_GROUP_HEIGHT) + uGroupThreadId; |
|
||||
|
|
||||
float3 ColorPreAlpha = LoadOpaqueOnly( FFX_MIN16_I2(uDispatchThreadId) ).rgb; |
|
||||
float3 ColorPostAlpha = LoadInputColor(uDispatchThreadId).rgb; |
|
||||
|
|
||||
if (flags & FFX_FSR2_AUTOREACTIVEFLAGS_APPLY_TONEMAP) |
|
||||
{ |
|
||||
ColorPreAlpha = Tonemap(ColorPreAlpha); |
|
||||
ColorPostAlpha = Tonemap(ColorPostAlpha); |
|
||||
} |
|
||||
|
|
||||
if (flags & FFX_FSR2_AUTOREACTIVEFLAGS_APPLY_INVERSETONEMAP) |
|
||||
{ |
|
||||
ColorPreAlpha = InverseTonemap(ColorPreAlpha); |
|
||||
ColorPostAlpha = InverseTonemap(ColorPostAlpha); |
|
||||
} |
|
||||
|
|
||||
float out_reactive_value = 0.f; |
|
||||
float3 delta = abs(ColorPostAlpha - ColorPreAlpha); |
|
||||
|
|
||||
out_reactive_value = (flags & FFX_FSR2_AUTOREACTIVEFLAGS_USE_COMPONENTS_MAX) ? max(delta.x, max(delta.y, delta.z)) : length(delta); |
|
||||
out_reactive_value *= scale; |
|
||||
|
|
||||
out_reactive_value = (flags & FFX_FSR2_AUTOREACTIVEFLAGS_APPLY_THRESHOLD) ? (out_reactive_value < threshold ? 0 : binaryValue) : out_reactive_value; |
|
||||
|
|
||||
rw_output_autoreactive[uDispatchThreadId] = out_reactive_value; |
|
||||
} |
|
||||
@ -1,817 +0,0 @@ |
|||||
// This file is part of the FidelityFX SDK. |
|
||||
// |
|
||||
// Copyright (c) 2022-2023 Advanced Micro Devices, Inc. All rights reserved. |
|
||||
// |
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy |
|
||||
// of this software and associated documentation files (the "Software"), to deal |
|
||||
// in the Software without restriction, including without limitation the rights |
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
|
||||
// copies of the Software, and to permit persons to whom the Software is |
|
||||
// furnished to do so, subject to the following conditions: |
|
||||
// The above copyright notice and this permission notice shall be included in |
|
||||
// all copies or substantial portions of the Software. |
|
||||
// |
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
|
||||
// THE SOFTWARE. |
|
||||
|
|
||||
#include "ffx_fsr2_resources.h" |
|
||||
|
|
||||
#if defined(FFX_GPU) |
|
||||
#ifdef __hlsl_dx_compiler |
|
||||
#pragma dxc diagnostic push |
|
||||
#pragma dxc diagnostic ignored "-Wambig-lit-shift" |
|
||||
#endif //__hlsl_dx_compiler |
|
||||
#include "ffx_core.h" |
|
||||
#ifdef __hlsl_dx_compiler |
|
||||
#pragma dxc diagnostic pop |
|
||||
#endif //__hlsl_dx_compiler |
|
||||
#endif // #if defined(FFX_GPU) |
|
||||
|
|
||||
#if defined(FFX_GPU) |
|
||||
#ifndef FFX_FSR2_PREFER_WAVE64 |
|
||||
#define FFX_FSR2_PREFER_WAVE64 |
|
||||
#endif // #if defined(FFX_GPU) |
|
||||
|
|
||||
#if defined(FFX_GPU) |
|
||||
#pragma warning(disable: 3205) // conversion from larger type to smaller |
|
||||
#endif // #if defined(FFX_GPU) |
|
||||
|
|
||||
#define DECLARE_SRV_REGISTER(regIndex) t##regIndex |
|
||||
#define DECLARE_UAV_REGISTER(regIndex) u##regIndex |
|
||||
#define DECLARE_CB_REGISTER(regIndex) b##regIndex |
|
||||
#define FFX_FSR2_DECLARE_SRV(regIndex) register(DECLARE_SRV_REGISTER(regIndex)) |
|
||||
#define FFX_FSR2_DECLARE_UAV(regIndex) register(DECLARE_UAV_REGISTER(regIndex)) |
|
||||
#define FFX_FSR2_DECLARE_CB(regIndex) register(DECLARE_CB_REGISTER(regIndex)) |
|
||||
|
|
||||
#if defined(FSR2_BIND_CB_FSR2) || defined(FFX_INTERNAL) |
|
||||
cbuffer cbFSR2 : FFX_FSR2_DECLARE_CB(FSR2_BIND_CB_FSR2) |
|
||||
{ |
|
||||
FfxInt32x2 iRenderSize; |
|
||||
FfxInt32x2 iMaxRenderSize; |
|
||||
FfxInt32x2 iDisplaySize; |
|
||||
FfxInt32x2 iInputColorResourceDimensions; |
|
||||
FfxInt32x2 iLumaMipDimensions; |
|
||||
FfxInt32 iLumaMipLevelToUse; |
|
||||
FfxInt32 iFrameIndex; |
|
||||
|
|
||||
FfxFloat32x4 fDeviceToViewDepth; |
|
||||
FfxFloat32x2 fJitter; |
|
||||
FfxFloat32x2 fMotionVectorScale; |
|
||||
FfxFloat32x2 fDownscaleFactor; |
|
||||
FfxFloat32x2 fMotionVectorJitterCancellation; |
|
||||
FfxFloat32 fPreExposure; |
|
||||
FfxFloat32 fPreviousFramePreExposure; |
|
||||
FfxFloat32 fTanHalfFOV; |
|
||||
FfxFloat32 fJitterSequenceLength; |
|
||||
FfxFloat32 fDeltaTime; |
|
||||
FfxFloat32 fDynamicResChangeFactor; |
|
||||
FfxFloat32 fViewSpaceToMetersFactor; |
|
||||
|
|
||||
FfxInt32 iDummy; |
|
||||
}; |
|
||||
|
|
||||
#define FFX_FSR2_CONSTANT_BUFFER_1_SIZE (sizeof(cbFSR2) / 4) // Number of 32-bit values. This must be kept in sync with the cbFSR2 size. |
|
||||
#endif |
|
||||
|
|
||||
#if defined(FFX_GPU) |
|
||||
#define FFX_FSR2_ROOTSIG_STRINGIFY(p) FFX_FSR2_ROOTSIG_STR(p) |
|
||||
#define FFX_FSR2_ROOTSIG_STR(p) #p |
|
||||
#define FFX_FSR2_ROOTSIG [RootSignature( "DescriptorTable(UAV(u0, numDescriptors = " FFX_FSR2_ROOTSIG_STRINGIFY(FFX_FSR2_RESOURCE_IDENTIFIER_COUNT) ")), " \ |
|
||||
"DescriptorTable(SRV(t0, numDescriptors = " FFX_FSR2_ROOTSIG_STRINGIFY(FFX_FSR2_RESOURCE_IDENTIFIER_COUNT) ")), " \ |
|
||||
"RootConstants(num32BitConstants=" FFX_FSR2_ROOTSIG_STRINGIFY(FFX_FSR2_CONSTANT_BUFFER_1_SIZE) ", b0), " \ |
|
||||
"StaticSampler(s0, filter = FILTER_MIN_MAG_MIP_POINT, " \ |
|
||||
"addressU = TEXTURE_ADDRESS_CLAMP, " \ |
|
||||
"addressV = TEXTURE_ADDRESS_CLAMP, " \ |
|
||||
"addressW = TEXTURE_ADDRESS_CLAMP, " \ |
|
||||
"comparisonFunc = COMPARISON_NEVER, " \ |
|
||||
"borderColor = STATIC_BORDER_COLOR_TRANSPARENT_BLACK), " \ |
|
||||
"StaticSampler(s1, filter = FILTER_MIN_MAG_MIP_LINEAR, " \ |
|
||||
"addressU = TEXTURE_ADDRESS_CLAMP, " \ |
|
||||
"addressV = TEXTURE_ADDRESS_CLAMP, " \ |
|
||||
"addressW = TEXTURE_ADDRESS_CLAMP, " \ |
|
||||
"comparisonFunc = COMPARISON_NEVER, " \ |
|
||||
"borderColor = STATIC_BORDER_COLOR_TRANSPARENT_BLACK)" )] |
|
||||
|
|
||||
#define FFX_FSR2_CONSTANT_BUFFER_2_SIZE 6 // Number of 32-bit values. This must be kept in sync with max( cbRCAS , cbSPD) size. |
|
||||
|
|
||||
#define FFX_FSR2_CB2_ROOTSIG [RootSignature( "DescriptorTable(UAV(u0, numDescriptors = " FFX_FSR2_ROOTSIG_STRINGIFY(FFX_FSR2_RESOURCE_IDENTIFIER_COUNT) ")), " \ |
|
||||
"DescriptorTable(SRV(t0, numDescriptors = " FFX_FSR2_ROOTSIG_STRINGIFY(FFX_FSR2_RESOURCE_IDENTIFIER_COUNT) ")), " \ |
|
||||
"RootConstants(num32BitConstants=" FFX_FSR2_ROOTSIG_STRINGIFY(FFX_FSR2_CONSTANT_BUFFER_1_SIZE) ", b0), " \ |
|
||||
"RootConstants(num32BitConstants=" FFX_FSR2_ROOTSIG_STRINGIFY(FFX_FSR2_CONSTANT_BUFFER_2_SIZE) ", b1), " \ |
|
||||
"StaticSampler(s0, filter = FILTER_MIN_MAG_MIP_POINT, " \ |
|
||||
"addressU = TEXTURE_ADDRESS_CLAMP, " \ |
|
||||
"addressV = TEXTURE_ADDRESS_CLAMP, " \ |
|
||||
"addressW = TEXTURE_ADDRESS_CLAMP, " \ |
|
||||
"comparisonFunc = COMPARISON_NEVER, " \ |
|
||||
"borderColor = STATIC_BORDER_COLOR_TRANSPARENT_BLACK), " \ |
|
||||
"StaticSampler(s1, filter = FILTER_MIN_MAG_MIP_LINEAR, " \ |
|
||||
"addressU = TEXTURE_ADDRESS_CLAMP, " \ |
|
||||
"addressV = TEXTURE_ADDRESS_CLAMP, " \ |
|
||||
"addressW = TEXTURE_ADDRESS_CLAMP, " \ |
|
||||
"comparisonFunc = COMPARISON_NEVER, " \ |
|
||||
"borderColor = STATIC_BORDER_COLOR_TRANSPARENT_BLACK)" )] |
|
||||
#if defined(FFX_FSR2_EMBED_ROOTSIG) |
|
||||
#define FFX_FSR2_EMBED_ROOTSIG_CONTENT FFX_FSR2_ROOTSIG |
|
||||
#define FFX_FSR2_EMBED_CB2_ROOTSIG_CONTENT FFX_FSR2_CB2_ROOTSIG |
|
||||
#else |
|
||||
#define FFX_FSR2_EMBED_ROOTSIG_CONTENT |
|
||||
#define FFX_FSR2_EMBED_CB2_ROOTSIG_CONTENT |
|
||||
#endif // #if FFX_FSR2_EMBED_ROOTSIG |
|
||||
#endif // #if defined(FFX_GPU) |
|
||||
|
|
||||
// Declare and sample camera buffers as regular textures, unless overridden |
|
||||
#if !defined(UNITY_FSR2_TEX2D) |
|
||||
#define UNITY_FSR2_TEX2D(type) Texture2D<type> |
|
||||
#endif |
|
||||
#if !defined(UNITY_FSR2_POS) |
|
||||
#define UNITY_FSR2_POS(pxPos) (pxPos) |
|
||||
#endif |
|
||||
#if !defined(UNITY_FSR2_UV) |
|
||||
#define UNITY_FSR2_UV(uv) (uv) |
|
||||
#endif |
|
||||
|
|
||||
/* Define getter functions in the order they are defined in the CB! */ |
|
||||
FfxInt32x2 RenderSize() |
|
||||
{ |
|
||||
return iRenderSize; |
|
||||
} |
|
||||
|
|
||||
FfxInt32x2 MaxRenderSize() |
|
||||
{ |
|
||||
return iMaxRenderSize; |
|
||||
} |
|
||||
|
|
||||
FfxInt32x2 DisplaySize() |
|
||||
{ |
|
||||
return iDisplaySize; |
|
||||
} |
|
||||
|
|
||||
FfxInt32x2 InputColorResourceDimensions() |
|
||||
{ |
|
||||
return iInputColorResourceDimensions; |
|
||||
} |
|
||||
|
|
||||
FfxInt32x2 LumaMipDimensions() |
|
||||
{ |
|
||||
return iLumaMipDimensions; |
|
||||
} |
|
||||
|
|
||||
FfxInt32 LumaMipLevelToUse() |
|
||||
{ |
|
||||
return iLumaMipLevelToUse; |
|
||||
} |
|
||||
|
|
||||
FfxInt32 FrameIndex() |
|
||||
{ |
|
||||
return iFrameIndex; |
|
||||
} |
|
||||
|
|
||||
FfxFloat32x2 Jitter() |
|
||||
{ |
|
||||
return fJitter; |
|
||||
} |
|
||||
|
|
||||
FfxFloat32x4 DeviceToViewSpaceTransformFactors() |
|
||||
{ |
|
||||
return fDeviceToViewDepth; |
|
||||
} |
|
||||
|
|
||||
FfxFloat32x2 MotionVectorScale() |
|
||||
{ |
|
||||
return fMotionVectorScale; |
|
||||
} |
|
||||
|
|
||||
FfxFloat32x2 DownscaleFactor() |
|
||||
{ |
|
||||
return fDownscaleFactor; |
|
||||
} |
|
||||
|
|
||||
FfxFloat32x2 MotionVectorJitterCancellation() |
|
||||
{ |
|
||||
return fMotionVectorJitterCancellation; |
|
||||
} |
|
||||
|
|
||||
FfxFloat32 PreExposure() |
|
||||
{ |
|
||||
return fPreExposure; |
|
||||
} |
|
||||
|
|
||||
FfxFloat32 PreviousFramePreExposure() |
|
||||
{ |
|
||||
return fPreviousFramePreExposure; |
|
||||
} |
|
||||
|
|
||||
FfxFloat32 TanHalfFoV() |
|
||||
{ |
|
||||
return fTanHalfFOV; |
|
||||
} |
|
||||
|
|
||||
FfxFloat32 JitterSequenceLength() |
|
||||
{ |
|
||||
return fJitterSequenceLength; |
|
||||
} |
|
||||
|
|
||||
FfxFloat32 DeltaTime() |
|
||||
{ |
|
||||
return fDeltaTime; |
|
||||
} |
|
||||
|
|
||||
FfxFloat32 DynamicResChangeFactor() |
|
||||
{ |
|
||||
return fDynamicResChangeFactor; |
|
||||
} |
|
||||
|
|
||||
FfxFloat32 ViewSpaceToMetersFactor() |
|
||||
{ |
|
||||
return fViewSpaceToMetersFactor; |
|
||||
} |
|
||||
|
|
||||
|
|
||||
SamplerState s_PointClamp : register(s0); |
|
||||
SamplerState s_LinearClamp : register(s1); |
|
||||
|
|
||||
// SRVs |
|
||||
#if defined(FFX_INTERNAL) |
|
||||
UNITY_FSR2_TEX2D(FfxFloat32x4) r_input_opaque_only : FFX_FSR2_DECLARE_SRV(FFX_FSR2_RESOURCE_IDENTIFIER_INPUT_OPAQUE_ONLY); |
|
||||
UNITY_FSR2_TEX2D(FfxFloat32x4) r_input_color_jittered : FFX_FSR2_DECLARE_SRV(FFX_FSR2_RESOURCE_IDENTIFIER_INPUT_COLOR); |
|
||||
UNITY_FSR2_TEX2D(FfxFloat32x4) r_input_motion_vectors : FFX_FSR2_DECLARE_SRV(FFX_FSR2_RESOURCE_IDENTIFIER_INPUT_MOTION_VECTORS); |
|
||||
UNITY_FSR2_TEX2D(FfxFloat32) r_input_depth : FFX_FSR2_DECLARE_SRV(FFX_FSR2_RESOURCE_IDENTIFIER_INPUT_DEPTH); |
|
||||
Texture2D<FfxFloat32x2> r_input_exposure : FFX_FSR2_DECLARE_SRV(FFX_FSR2_RESOURCE_IDENTIFIER_INPUT_EXPOSURE); |
|
||||
Texture2D<FfxFloat32x2> r_auto_exposure : FFX_FSR2_DECLARE_SRV(FFX_FSR2_RESOURCE_IDENTIFIER_AUTO_EXPOSURE); |
|
||||
Texture2D<FfxFloat32> r_reactive_mask : FFX_FSR2_DECLARE_SRV(FFX_FSR2_RESOURCE_IDENTIFIER_INPUT_REACTIVE_MASK); |
|
||||
Texture2D<FfxFloat32> r_transparency_and_composition_mask : FFX_FSR2_DECLARE_SRV(FFX_FSR2_RESOURCE_IDENTIFIER_INPUT_TRANSPARENCY_AND_COMPOSITION_MASK); |
|
||||
Texture2D<FfxUInt32> r_reconstructed_previous_nearest_depth : FFX_FSR2_DECLARE_SRV(FFX_FSR2_RESOURCE_IDENTIFIER_RECONSTRUCTED_PREVIOUS_NEAREST_DEPTH); |
|
||||
Texture2D<FfxFloat32x2> r_dilated_motion_vectors : FFX_FSR2_DECLARE_SRV(FFX_FSR2_RESOURCE_IDENTIFIER_DILATED_MOTION_VECTORS); |
|
||||
Texture2D<FfxFloat32x2> r_previous_dilated_motion_vectors : FFX_FSR2_DECLARE_SRV(FFX_FSR2_RESOURCE_IDENTIFIER_PREVIOUS_DILATED_MOTION_VECTORS); |
|
||||
Texture2D<FfxFloat32> r_dilatedDepth : FFX_FSR2_DECLARE_SRV(FFX_FSR2_RESOURCE_IDENTIFIER_DILATED_DEPTH); |
|
||||
Texture2D<FfxFloat32x4> r_internal_upscaled_color : FFX_FSR2_DECLARE_SRV(FFX_FSR2_RESOURCE_IDENTIFIER_INTERNAL_UPSCALED_COLOR); |
|
||||
Texture2D<unorm FfxFloat32x2> r_lock_status : FFX_FSR2_DECLARE_SRV(FFX_FSR2_RESOURCE_IDENTIFIER_LOCK_STATUS); |
|
||||
Texture2D<FfxFloat32> r_lock_input_luma : FFX_FSR2_DECLARE_SRV(FFX_FSR2_RESOURCE_IDENTIFIER_LOCK_INPUT_LUMA); |
|
||||
Texture2D<unorm FfxFloat32> r_new_locks : FFX_FSR2_DECLARE_SRV(FFX_FSR2_RESOURCE_IDENTIFIER_NEW_LOCKS); |
|
||||
Texture2D<FfxFloat32x4> r_prepared_input_color : FFX_FSR2_DECLARE_SRV(FFX_FSR2_RESOURCE_IDENTIFIER_PREPARED_INPUT_COLOR); |
|
||||
Texture2D<FfxFloat32x4> r_luma_history : FFX_FSR2_DECLARE_SRV(FFX_FSR2_RESOURCE_IDENTIFIER_LUMA_HISTORY); |
|
||||
Texture2D<FfxFloat32x4> r_rcas_input : FFX_FSR2_DECLARE_SRV(FFX_FSR2_RESOURCE_IDENTIFIER_RCAS_INPUT); |
|
||||
Texture2D<FfxFloat32> r_lanczos_lut : FFX_FSR2_DECLARE_SRV(FFX_FSR2_RESOURCE_IDENTIFIER_LANCZOS_LUT); |
|
||||
Texture2D<FfxFloat32> r_imgMips : FFX_FSR2_DECLARE_SRV(FFX_FSR2_RESOURCE_IDENTIFIER_SCENE_LUMINANCE); |
|
||||
Texture2D<FfxFloat32> r_upsample_maximum_bias_lut : FFX_FSR2_DECLARE_SRV(FFX_FSR2_RESOURCE_IDENTITIER_UPSAMPLE_MAXIMUM_BIAS_LUT); |
|
||||
Texture2D<unorm FfxFloat32x2> r_dilated_reactive_masks : FFX_FSR2_DECLARE_SRV(FFX_FSR2_RESOURCE_IDENTIFIER_DILATED_REACTIVE_MASKS); |
|
||||
Texture2D<float3> r_input_prev_color_pre_alpha : FFX_FSR2_DECLARE_SRV(FFX_FSR2_RESOURCE_IDENTIFIER_PREV_PRE_ALPHA_COLOR); |
|
||||
Texture2D<float3> r_input_prev_color_post_alpha : FFX_FSR2_DECLARE_SRV(FFX_FSR2_RESOURCE_IDENTIFIER_PREV_POST_ALPHA_COLOR); |
|
||||
|
|
||||
Texture2D<FfxFloat32x4> r_debug_out : FFX_FSR2_DECLARE_SRV(FFX_FSR2_RESOURCE_IDENTIFIER_DEBUG_OUTPUT); |
|
||||
|
|
||||
// UAV declarations |
|
||||
RWTexture2D<FfxUInt32> rw_reconstructed_previous_nearest_depth : FFX_FSR2_DECLARE_UAV(FFX_FSR2_RESOURCE_IDENTIFIER_RECONSTRUCTED_PREVIOUS_NEAREST_DEPTH); |
|
||||
RWTexture2D<FfxFloat32x2> rw_dilated_motion_vectors : FFX_FSR2_DECLARE_UAV(FFX_FSR2_RESOURCE_IDENTIFIER_DILATED_MOTION_VECTORS); |
|
||||
RWTexture2D<FfxFloat32> rw_dilatedDepth : FFX_FSR2_DECLARE_UAV(FFX_FSR2_RESOURCE_IDENTIFIER_DILATED_DEPTH); |
|
||||
RWTexture2D<FfxFloat32x4> rw_internal_upscaled_color : FFX_FSR2_DECLARE_UAV(FFX_FSR2_RESOURCE_IDENTIFIER_INTERNAL_UPSCALED_COLOR); |
|
||||
RWTexture2D<unorm FfxFloat32x2> rw_lock_status : FFX_FSR2_DECLARE_UAV(FFX_FSR2_RESOURCE_IDENTIFIER_LOCK_STATUS); |
|
||||
RWTexture2D<FfxFloat32> rw_lock_input_luma : FFX_FSR2_DECLARE_UAV(FFX_FSR2_RESOURCE_IDENTIFIER_LOCK_INPUT_LUMA); |
|
||||
RWTexture2D<unorm FfxFloat32> rw_new_locks : FFX_FSR2_DECLARE_UAV(FFX_FSR2_RESOURCE_IDENTIFIER_NEW_LOCKS); |
|
||||
RWTexture2D<FfxFloat32x4> rw_prepared_input_color : FFX_FSR2_DECLARE_UAV(FFX_FSR2_RESOURCE_IDENTIFIER_PREPARED_INPUT_COLOR); |
|
||||
RWTexture2D<FfxFloat32x4> rw_luma_history : FFX_FSR2_DECLARE_UAV(FFX_FSR2_RESOURCE_IDENTIFIER_LUMA_HISTORY); |
|
||||
RWTexture2D<FfxFloat32x4> rw_upscaled_output : FFX_FSR2_DECLARE_UAV(FFX_FSR2_RESOURCE_IDENTIFIER_UPSCALED_OUTPUT); |
|
||||
|
|
||||
globallycoherent RWTexture2D<FfxFloat32> rw_img_mip_shading_change : FFX_FSR2_DECLARE_UAV(FFX_FSR2_RESOURCE_IDENTIFIER_SCENE_LUMINANCE_MIPMAP_SHADING_CHANGE); |
|
||||
globallycoherent RWTexture2D<FfxFloat32> rw_img_mip_5 : FFX_FSR2_DECLARE_UAV(FFX_FSR2_RESOURCE_IDENTIFIER_SCENE_LUMINANCE_MIPMAP_5); |
|
||||
RWTexture2D<unorm FfxFloat32x2> rw_dilated_reactive_masks : FFX_FSR2_DECLARE_UAV(FFX_FSR2_RESOURCE_IDENTIFIER_DILATED_REACTIVE_MASKS); |
|
||||
RWTexture2D<FfxFloat32x2> rw_auto_exposure : FFX_FSR2_DECLARE_UAV(FFX_FSR2_RESOURCE_IDENTIFIER_AUTO_EXPOSURE); |
|
||||
globallycoherent RWTexture2D<FfxUInt32> rw_spd_global_atomic : FFX_FSR2_DECLARE_UAV(FFX_FSR2_RESOURCE_IDENTIFIER_SPD_ATOMIC_COUNT); |
|
||||
RWTexture2D<FfxFloat32x4> rw_debug_out : FFX_FSR2_DECLARE_UAV(FFX_FSR2_RESOURCE_IDENTIFIER_DEBUG_OUTPUT); |
|
||||
|
|
||||
RWTexture2D<float> rw_output_autoreactive : FFX_FSR2_DECLARE_UAV(FFX_FSR2_RESOURCE_IDENTIFIER_AUTOREACTIVE); |
|
||||
RWTexture2D<float> rw_output_autocomposition : FFX_FSR2_DECLARE_UAV(FFX_FSR2_RESOURCE_IDENTIFIER_AUTOCOMPOSITION); |
|
||||
RWTexture2D<float3> rw_output_prev_color_pre_alpha : FFX_FSR2_DECLARE_UAV(FFX_FSR2_RESOURCE_IDENTIFIER_PREV_PRE_ALPHA_COLOR); |
|
||||
RWTexture2D<float3> rw_output_prev_color_post_alpha : FFX_FSR2_DECLARE_UAV(FFX_FSR2_RESOURCE_IDENTIFIER_PREV_POST_ALPHA_COLOR); |
|
||||
|
|
||||
#else // #if defined(FFX_INTERNAL) |
|
||||
#if defined FSR2_BIND_SRV_INPUT_COLOR |
|
||||
UNITY_FSR2_TEX2D(FfxFloat32x4) r_input_color_jittered : FFX_FSR2_DECLARE_SRV(FSR2_BIND_SRV_INPUT_COLOR); |
|
||||
#endif |
|
||||
#if defined FSR2_BIND_SRV_INPUT_OPAQUE_ONLY |
|
||||
UNITY_FSR2_TEX2D(FfxFloat32x4) r_input_opaque_only : FFX_FSR2_DECLARE_SRV(FSR2_BIND_SRV_INPUT_OPAQUE_ONLY); |
|
||||
#endif |
|
||||
#if defined FSR2_BIND_SRV_INPUT_MOTION_VECTORS |
|
||||
UNITY_FSR2_TEX2D(FfxFloat32x4) r_input_motion_vectors : FFX_FSR2_DECLARE_SRV(FSR2_BIND_SRV_INPUT_MOTION_VECTORS); |
|
||||
#endif |
|
||||
#if defined FSR2_BIND_SRV_INPUT_DEPTH |
|
||||
UNITY_FSR2_TEX2D(FfxFloat32) r_input_depth : FFX_FSR2_DECLARE_SRV(FSR2_BIND_SRV_INPUT_DEPTH); |
|
||||
#endif |
|
||||
#if defined FSR2_BIND_SRV_INPUT_EXPOSURE |
|
||||
Texture2D<FfxFloat32x2> r_input_exposure : FFX_FSR2_DECLARE_SRV(FSR2_BIND_SRV_INPUT_EXPOSURE); |
|
||||
#endif |
|
||||
#if defined FSR2_BIND_SRV_AUTO_EXPOSURE |
|
||||
Texture2D<FfxFloat32x2> r_auto_exposure : FFX_FSR2_DECLARE_SRV(FSR2_BIND_SRV_AUTO_EXPOSURE); |
|
||||
#endif |
|
||||
#if defined FSR2_BIND_SRV_REACTIVE_MASK |
|
||||
Texture2D<FfxFloat32> r_reactive_mask : FFX_FSR2_DECLARE_SRV(FSR2_BIND_SRV_REACTIVE_MASK); |
|
||||
#endif |
|
||||
#if defined FSR2_BIND_SRV_TRANSPARENCY_AND_COMPOSITION_MASK |
|
||||
Texture2D<FfxFloat32> r_transparency_and_composition_mask : FFX_FSR2_DECLARE_SRV(FSR2_BIND_SRV_TRANSPARENCY_AND_COMPOSITION_MASK); |
|
||||
#endif |
|
||||
#if defined FSR2_BIND_SRV_RECONSTRUCTED_PREV_NEAREST_DEPTH |
|
||||
Texture2D<FfxUInt32> r_reconstructed_previous_nearest_depth : FFX_FSR2_DECLARE_SRV(FSR2_BIND_SRV_RECONSTRUCTED_PREV_NEAREST_DEPTH); |
|
||||
#endif |
|
||||
#if defined FSR2_BIND_SRV_DILATED_MOTION_VECTORS |
|
||||
Texture2D<FfxFloat32x2> r_dilated_motion_vectors : FFX_FSR2_DECLARE_SRV(FSR2_BIND_SRV_DILATED_MOTION_VECTORS); |
|
||||
#endif |
|
||||
#if defined FSR2_BIND_SRV_PREVIOUS_DILATED_MOTION_VECTORS |
|
||||
Texture2D<FfxFloat32x2> r_previous_dilated_motion_vectors : FFX_FSR2_DECLARE_SRV(FSR2_BIND_SRV_PREVIOUS_DILATED_MOTION_VECTORS); |
|
||||
#endif |
|
||||
#if defined FSR2_BIND_SRV_DILATED_DEPTH |
|
||||
Texture2D<FfxFloat32> r_dilatedDepth : FFX_FSR2_DECLARE_SRV(FSR2_BIND_SRV_DILATED_DEPTH); |
|
||||
#endif |
|
||||
#if defined FSR2_BIND_SRV_INTERNAL_UPSCALED |
|
||||
Texture2D<FfxFloat32x4> r_internal_upscaled_color : FFX_FSR2_DECLARE_SRV(FSR2_BIND_SRV_INTERNAL_UPSCALED); |
|
||||
#endif |
|
||||
#if defined FSR2_BIND_SRV_LOCK_STATUS |
|
||||
Texture2D<unorm FfxFloat32x2> r_lock_status : FFX_FSR2_DECLARE_SRV(FSR2_BIND_SRV_LOCK_STATUS); |
|
||||
#endif |
|
||||
#if defined FSR2_BIND_SRV_LOCK_INPUT_LUMA |
|
||||
Texture2D<FfxFloat32> r_lock_input_luma : FFX_FSR2_DECLARE_SRV(FSR2_BIND_SRV_LOCK_INPUT_LUMA); |
|
||||
#endif |
|
||||
#if defined FSR2_BIND_SRV_NEW_LOCKS |
|
||||
Texture2D<unorm FfxFloat32> r_new_locks : FFX_FSR2_DECLARE_SRV(FSR2_BIND_SRV_NEW_LOCKS); |
|
||||
#endif |
|
||||
#if defined FSR2_BIND_SRV_PREPARED_INPUT_COLOR |
|
||||
Texture2D<FfxFloat32x4> r_prepared_input_color : FFX_FSR2_DECLARE_SRV(FSR2_BIND_SRV_PREPARED_INPUT_COLOR); |
|
||||
#endif |
|
||||
#if defined FSR2_BIND_SRV_LUMA_HISTORY |
|
||||
Texture2D<unorm FfxFloat32x4> r_luma_history : FFX_FSR2_DECLARE_SRV(FSR2_BIND_SRV_LUMA_HISTORY); |
|
||||
#endif |
|
||||
#if defined FSR2_BIND_SRV_RCAS_INPUT |
|
||||
Texture2D<FfxFloat32x4> r_rcas_input : FFX_FSR2_DECLARE_SRV(FSR2_BIND_SRV_RCAS_INPUT); |
|
||||
#endif |
|
||||
#if defined FSR2_BIND_SRV_LANCZOS_LUT |
|
||||
Texture2D<FfxFloat32> r_lanczos_lut : FFX_FSR2_DECLARE_SRV(FSR2_BIND_SRV_LANCZOS_LUT); |
|
||||
#endif |
|
||||
#if defined FSR2_BIND_SRV_SCENE_LUMINANCE_MIPS |
|
||||
Texture2D<FfxFloat32> r_imgMips : FFX_FSR2_DECLARE_SRV(FSR2_BIND_SRV_SCENE_LUMINANCE_MIPS); |
|
||||
#endif |
|
||||
#if defined FSR2_BIND_SRV_UPSCALE_MAXIMUM_BIAS_LUT |
|
||||
Texture2D<FfxFloat32> r_upsample_maximum_bias_lut : FFX_FSR2_DECLARE_SRV(FSR2_BIND_SRV_UPSCALE_MAXIMUM_BIAS_LUT); |
|
||||
#endif |
|
||||
#if defined FSR2_BIND_SRV_DILATED_REACTIVE_MASKS |
|
||||
Texture2D<unorm FfxFloat32x2> r_dilated_reactive_masks : FFX_FSR2_DECLARE_SRV(FSR2_BIND_SRV_DILATED_REACTIVE_MASKS); |
|
||||
#endif |
|
||||
|
|
||||
#if defined FSR2_BIND_SRV_PREV_PRE_ALPHA_COLOR |
|
||||
Texture2D<float3> r_input_prev_color_pre_alpha : FFX_FSR2_DECLARE_SRV(FFX_FSR2_RESOURCE_IDENTIFIER_PREV_PRE_ALPHA_COLOR); |
|
||||
#endif |
|
||||
#if defined FSR2_BIND_SRV_PREV_POST_ALPHA_COLOR |
|
||||
Texture2D<float3> r_input_prev_color_post_alpha : FFX_FSR2_DECLARE_SRV(FFX_FSR2_RESOURCE_IDENTIFIER_PREV_POST_ALPHA_COLOR); |
|
||||
#endif |
|
||||
|
|
||||
// UAV declarations |
|
||||
#if defined FSR2_BIND_UAV_RECONSTRUCTED_PREV_NEAREST_DEPTH |
|
||||
RWTexture2D<FfxUInt32> rw_reconstructed_previous_nearest_depth : FFX_FSR2_DECLARE_UAV(FSR2_BIND_UAV_RECONSTRUCTED_PREV_NEAREST_DEPTH); |
|
||||
#endif |
|
||||
#if defined FSR2_BIND_UAV_DILATED_MOTION_VECTORS |
|
||||
RWTexture2D<FfxFloat32x2> rw_dilated_motion_vectors : FFX_FSR2_DECLARE_UAV(FSR2_BIND_UAV_DILATED_MOTION_VECTORS); |
|
||||
#endif |
|
||||
#if defined FSR2_BIND_UAV_DILATED_DEPTH |
|
||||
RWTexture2D<FfxFloat32> rw_dilatedDepth : FFX_FSR2_DECLARE_UAV(FSR2_BIND_UAV_DILATED_DEPTH); |
|
||||
#endif |
|
||||
#if defined FSR2_BIND_UAV_INTERNAL_UPSCALED |
|
||||
RWTexture2D<FfxFloat32x4> rw_internal_upscaled_color : FFX_FSR2_DECLARE_UAV(FSR2_BIND_UAV_INTERNAL_UPSCALED); |
|
||||
#endif |
|
||||
#if defined FSR2_BIND_UAV_LOCK_STATUS |
|
||||
RWTexture2D<unorm FfxFloat32x2> rw_lock_status : FFX_FSR2_DECLARE_UAV(FSR2_BIND_UAV_LOCK_STATUS); |
|
||||
#endif |
|
||||
#if defined FSR2_BIND_UAV_LOCK_INPUT_LUMA |
|
||||
RWTexture2D<FfxFloat32> rw_lock_input_luma : FFX_FSR2_DECLARE_UAV(FSR2_BIND_UAV_LOCK_INPUT_LUMA); |
|
||||
#endif |
|
||||
#if defined FSR2_BIND_UAV_NEW_LOCKS |
|
||||
RWTexture2D<unorm FfxFloat32> rw_new_locks : FFX_FSR2_DECLARE_UAV(FSR2_BIND_UAV_NEW_LOCKS); |
|
||||
#endif |
|
||||
#if defined FSR2_BIND_UAV_PREPARED_INPUT_COLOR |
|
||||
RWTexture2D<FfxFloat32x4> rw_prepared_input_color : FFX_FSR2_DECLARE_UAV(FSR2_BIND_UAV_PREPARED_INPUT_COLOR); |
|
||||
#endif |
|
||||
#if defined FSR2_BIND_UAV_LUMA_HISTORY |
|
||||
RWTexture2D<FfxFloat32x4> rw_luma_history : FFX_FSR2_DECLARE_UAV(FSR2_BIND_UAV_LUMA_HISTORY); |
|
||||
#endif |
|
||||
#if defined FSR2_BIND_UAV_UPSCALED_OUTPUT |
|
||||
RWTexture2D<FfxFloat32x4> rw_upscaled_output : FFX_FSR2_DECLARE_UAV(FSR2_BIND_UAV_UPSCALED_OUTPUT); |
|
||||
#endif |
|
||||
#if defined FSR2_BIND_UAV_EXPOSURE_MIP_LUMA_CHANGE |
|
||||
globallycoherent RWTexture2D<FfxFloat32> rw_img_mip_shading_change : FFX_FSR2_DECLARE_UAV(FSR2_BIND_UAV_EXPOSURE_MIP_LUMA_CHANGE); |
|
||||
#endif |
|
||||
#if defined FSR2_BIND_UAV_EXPOSURE_MIP_5 |
|
||||
globallycoherent RWTexture2D<FfxFloat32> rw_img_mip_5 : FFX_FSR2_DECLARE_UAV(FSR2_BIND_UAV_EXPOSURE_MIP_5); |
|
||||
#endif |
|
||||
#if defined FSR2_BIND_UAV_DILATED_REACTIVE_MASKS |
|
||||
RWTexture2D<unorm FfxFloat32x2> rw_dilated_reactive_masks : FFX_FSR2_DECLARE_UAV(FSR2_BIND_UAV_DILATED_REACTIVE_MASKS); |
|
||||
#endif |
|
||||
#if defined FSR2_BIND_UAV_EXPOSURE |
|
||||
RWTexture2D<FfxFloat32x2> rw_exposure : FFX_FSR2_DECLARE_UAV(FSR2_BIND_UAV_EXPOSURE); |
|
||||
#endif |
|
||||
#if defined FSR2_BIND_UAV_AUTO_EXPOSURE |
|
||||
RWTexture2D<FfxFloat32x2> rw_auto_exposure : FFX_FSR2_DECLARE_UAV(FSR2_BIND_UAV_AUTO_EXPOSURE); |
|
||||
#endif |
|
||||
#if defined FSR2_BIND_UAV_SPD_GLOBAL_ATOMIC |
|
||||
globallycoherent RWTexture2D<FfxUInt32> rw_spd_global_atomic : FFX_FSR2_DECLARE_UAV(FSR2_BIND_UAV_SPD_GLOBAL_ATOMIC); |
|
||||
#endif |
|
||||
|
|
||||
#if defined FSR2_BIND_UAV_AUTOREACTIVE |
|
||||
RWTexture2D<float> rw_output_autoreactive : FFX_FSR2_DECLARE_UAV(FSR2_BIND_UAV_AUTOREACTIVE); |
|
||||
#endif |
|
||||
#if defined FSR2_BIND_UAV_AUTOCOMPOSITION |
|
||||
RWTexture2D<float> rw_output_autocomposition : FFX_FSR2_DECLARE_UAV(FSR2_BIND_UAV_AUTOCOMPOSITION); |
|
||||
#endif |
|
||||
#if defined FSR2_BIND_UAV_PREV_PRE_ALPHA_COLOR |
|
||||
RWTexture2D<float3> rw_output_prev_color_pre_alpha : FFX_FSR2_DECLARE_UAV(FSR2_BIND_UAV_PREV_PRE_ALPHA_COLOR); |
|
||||
#endif |
|
||||
#if defined FSR2_BIND_UAV_PREV_POST_ALPHA_COLOR |
|
||||
RWTexture2D<float3> rw_output_prev_color_post_alpha : FFX_FSR2_DECLARE_UAV(FSR2_BIND_UAV_PREV_POST_ALPHA_COLOR); |
|
||||
#endif |
|
||||
#endif // #if defined(FFX_INTERNAL) |
|
||||
|
|
||||
#if defined(FSR2_BIND_SRV_SCENE_LUMINANCE_MIPS) || defined(FFX_INTERNAL) |
|
||||
FfxFloat32 LoadMipLuma(FfxUInt32x2 iPxPos, FfxUInt32 mipLevel) |
|
||||
{ |
|
||||
return r_imgMips.mips[mipLevel][iPxPos]; |
|
||||
} |
|
||||
#endif |
|
||||
|
|
||||
#if defined(FSR2_BIND_SRV_SCENE_LUMINANCE_MIPS) || defined(FFX_INTERNAL) |
|
||||
FfxFloat32 SampleMipLuma(FfxFloat32x2 fUV, FfxUInt32 mipLevel) |
|
||||
{ |
|
||||
return r_imgMips.SampleLevel(s_LinearClamp, fUV, mipLevel); |
|
||||
} |
|
||||
#endif |
|
||||
|
|
||||
#if defined(FSR2_BIND_SRV_INPUT_DEPTH) || defined(FFX_INTERNAL) |
|
||||
FfxFloat32 LoadInputDepth(FfxUInt32x2 iPxPos) |
|
||||
{ |
|
||||
return r_input_depth[UNITY_FSR2_POS(iPxPos)]; |
|
||||
} |
|
||||
#endif |
|
||||
|
|
||||
#if defined(FSR2_BIND_SRV_INPUT_DEPTH) || defined(FFX_INTERNAL) |
|
||||
FfxFloat32 SampleInputDepth(FfxFloat32x2 fUV) |
|
||||
{ |
|
||||
return r_input_depth.SampleLevel(s_LinearClamp, UNITY_FSR2_UV(fUV), 0).x; |
|
||||
} |
|
||||
#endif |
|
||||
|
|
||||
#if defined(FSR2_BIND_SRV_REACTIVE_MASK) || defined(FFX_INTERNAL) |
|
||||
FfxFloat32 LoadReactiveMask(FfxUInt32x2 iPxPos) |
|
||||
{ |
|
||||
return r_reactive_mask[iPxPos]; |
|
||||
} |
|
||||
#endif |
|
||||
|
|
||||
#if defined(FSR2_BIND_SRV_TRANSPARENCY_AND_COMPOSITION_MASK) || defined(FFX_INTERNAL) |
|
||||
FfxFloat32 LoadTransparencyAndCompositionMask(FfxUInt32x2 iPxPos) |
|
||||
{ |
|
||||
return r_transparency_and_composition_mask[iPxPos]; |
|
||||
} |
|
||||
#endif |
|
||||
|
|
||||
#if defined(FSR2_BIND_SRV_INPUT_COLOR) || defined(FFX_INTERNAL) |
|
||||
FfxFloat32x3 LoadInputColor(FfxUInt32x2 iPxPos) |
|
||||
{ |
|
||||
return r_input_color_jittered[UNITY_FSR2_POS(iPxPos)].rgb; |
|
||||
} |
|
||||
#endif |
|
||||
|
|
||||
#if defined(FSR2_BIND_SRV_INPUT_COLOR) || defined(FFX_INTERNAL) |
|
||||
FfxFloat32x3 SampleInputColor(FfxFloat32x2 fUV) |
|
||||
{ |
|
||||
return r_input_color_jittered.SampleLevel(s_LinearClamp, UNITY_FSR2_UV(fUV), 0).rgb; |
|
||||
} |
|
||||
#endif |
|
||||
|
|
||||
#if defined(FSR2_BIND_SRV_PREPARED_INPUT_COLOR) || defined(FFX_INTERNAL) |
|
||||
FfxFloat32x3 LoadPreparedInputColor(FfxUInt32x2 iPxPos) |
|
||||
{ |
|
||||
return r_prepared_input_color[iPxPos].xyz; |
|
||||
} |
|
||||
#endif |
|
||||
|
|
||||
#if defined(FSR2_BIND_SRV_INPUT_MOTION_VECTORS) || defined(FFX_INTERNAL) |
|
||||
FfxFloat32x2 LoadInputMotionVector(FfxUInt32x2 iPxDilatedMotionVectorPos) |
|
||||
{ |
|
||||
FfxFloat32x2 fSrcMotionVector = r_input_motion_vectors[UNITY_FSR2_POS(iPxDilatedMotionVectorPos)].xy; |
|
||||
|
|
||||
FfxFloat32x2 fUvMotionVector = fSrcMotionVector * MotionVectorScale(); |
|
||||
|
|
||||
#if FFX_FSR2_OPTION_JITTERED_MOTION_VECTORS |
|
||||
fUvMotionVector -= MotionVectorJitterCancellation(); |
|
||||
#endif |
|
||||
|
|
||||
return fUvMotionVector; |
|
||||
} |
|
||||
#endif |
|
||||
|
|
||||
#if defined(FSR2_BIND_SRV_INTERNAL_UPSCALED) || defined(FFX_INTERNAL) |
|
||||
FfxFloat32x4 LoadHistory(FfxUInt32x2 iPxHistory) |
|
||||
{ |
|
||||
return r_internal_upscaled_color[iPxHistory]; |
|
||||
} |
|
||||
#endif |
|
||||
|
|
||||
#if defined(FSR2_BIND_UAV_LUMA_HISTORY) || defined(FFX_INTERNAL) |
|
||||
void StoreLumaHistory(FfxUInt32x2 iPxPos, FfxFloat32x4 fLumaHistory) |
|
||||
{ |
|
||||
rw_luma_history[iPxPos] = fLumaHistory; |
|
||||
} |
|
||||
|
|
||||
FfxFloat32x4 LoadRwLumaHistory(FFX_MIN16_I2 iPxPos) |
|
||||
{ |
|
||||
return rw_luma_history[iPxPos]; |
|
||||
} |
|
||||
#endif |
|
||||
|
|
||||
#if defined(FSR2_BIND_SRV_LUMA_HISTORY) || defined(FFX_INTERNAL) |
|
||||
FfxFloat32x4 SampleLumaHistory(FfxFloat32x2 fUV) |
|
||||
{ |
|
||||
return r_luma_history.SampleLevel(s_LinearClamp, fUV, 0); |
|
||||
} |
|
||||
#endif |
|
||||
|
|
||||
#if defined(FFX_INTERNAL) |
|
||||
FfxFloat32x4 SampleDebug(FfxFloat32x2 fUV) |
|
||||
{ |
|
||||
return r_debug_out.SampleLevel(s_LinearClamp, fUV, 0).w; |
|
||||
} |
|
||||
#endif |
|
||||
|
|
||||
#if defined(FSR2_BIND_UAV_INTERNAL_UPSCALED) || defined(FFX_INTERNAL) |
|
||||
void StoreReprojectedHistory(FfxUInt32x2 iPxHistory, FfxFloat32x4 fHistory) |
|
||||
{ |
|
||||
rw_internal_upscaled_color[iPxHistory] = fHistory; |
|
||||
} |
|
||||
#endif |
|
||||
|
|
||||
#if defined(FSR2_BIND_UAV_INTERNAL_UPSCALED) || defined(FFX_INTERNAL) |
|
||||
void StoreInternalColorAndWeight(FfxUInt32x2 iPxPos, FfxFloat32x4 fColorAndWeight) |
|
||||
{ |
|
||||
rw_internal_upscaled_color[iPxPos] = fColorAndWeight; |
|
||||
} |
|
||||
#endif |
|
||||
|
|
||||
#if defined(FSR2_BIND_UAV_UPSCALED_OUTPUT) || defined(FFX_INTERNAL) |
|
||||
void StoreUpscaledOutput(FfxUInt32x2 iPxPos, FfxFloat32x3 fColor) |
|
||||
{ |
|
||||
rw_upscaled_output[iPxPos] = FfxFloat32x4(fColor, 1.f); |
|
||||
} |
|
||||
#endif |
|
||||
|
|
||||
//LOCK_LIFETIME_REMAINING == 0 |
|
||||
//Should make LockInitialLifetime() return a const 1.0f later |
|
||||
#if defined(FSR2_BIND_SRV_LOCK_STATUS) || defined(FFX_INTERNAL) |
|
||||
FfxFloat32x2 LoadLockStatus(FfxUInt32x2 iPxPos) |
|
||||
{ |
|
||||
return r_lock_status[iPxPos]; |
|
||||
} |
|
||||
#endif |
|
||||
|
|
||||
#if defined(FSR2_BIND_UAV_LOCK_STATUS) || defined(FFX_INTERNAL) |
|
||||
void StoreLockStatus(FfxUInt32x2 iPxPos, FfxFloat32x2 fLockStatus) |
|
||||
{ |
|
||||
rw_lock_status[iPxPos] = fLockStatus; |
|
||||
} |
|
||||
#endif |
|
||||
|
|
||||
#if defined(FSR2_BIND_SRV_LOCK_INPUT_LUMA) || defined(FFX_INTERNAL) |
|
||||
FfxFloat32 LoadLockInputLuma(FfxUInt32x2 iPxPos) |
|
||||
{ |
|
||||
return r_lock_input_luma[iPxPos]; |
|
||||
} |
|
||||
#endif |
|
||||
|
|
||||
#if defined(FSR2_BIND_UAV_LOCK_INPUT_LUMA) || defined(FFX_INTERNAL) |
|
||||
void StoreLockInputLuma(FfxUInt32x2 iPxPos, FfxFloat32 fLuma) |
|
||||
{ |
|
||||
rw_lock_input_luma[iPxPos] = fLuma; |
|
||||
} |
|
||||
#endif |
|
||||
|
|
||||
#if defined(FSR2_BIND_SRV_NEW_LOCKS) || defined(FFX_INTERNAL) |
|
||||
FfxFloat32 LoadNewLocks(FfxUInt32x2 iPxPos) |
|
||||
{ |
|
||||
return r_new_locks[iPxPos]; |
|
||||
} |
|
||||
#endif |
|
||||
|
|
||||
#if defined(FSR2_BIND_UAV_NEW_LOCKS) || defined(FFX_INTERNAL) |
|
||||
FfxFloat32 LoadRwNewLocks(FfxUInt32x2 iPxPos) |
|
||||
{ |
|
||||
return rw_new_locks[iPxPos]; |
|
||||
} |
|
||||
#endif |
|
||||
|
|
||||
#if defined(FSR2_BIND_UAV_NEW_LOCKS) || defined(FFX_INTERNAL) |
|
||||
void StoreNewLocks(FfxUInt32x2 iPxPos, FfxFloat32 newLock) |
|
||||
{ |
|
||||
rw_new_locks[iPxPos] = newLock; |
|
||||
} |
|
||||
#endif |
|
||||
|
|
||||
#if defined(FSR2_BIND_UAV_PREPARED_INPUT_COLOR) || defined(FFX_INTERNAL) |
|
||||
void StorePreparedInputColor(FFX_PARAMETER_IN FfxUInt32x2 iPxPos, FFX_PARAMETER_IN FfxFloat32x4 fTonemapped) |
|
||||
{ |
|
||||
rw_prepared_input_color[iPxPos] = fTonemapped; |
|
||||
} |
|
||||
#endif |
|
||||
|
|
||||
#if defined(FSR2_BIND_SRV_PREPARED_INPUT_COLOR) || defined(FFX_INTERNAL) |
|
||||
FfxFloat32 SampleDepthClip(FfxFloat32x2 fUV) |
|
||||
{ |
|
||||
return r_prepared_input_color.SampleLevel(s_LinearClamp, fUV, 0).w; |
|
||||
} |
|
||||
#endif |
|
||||
|
|
||||
#if defined(FSR2_BIND_SRV_LOCK_STATUS) || defined(FFX_INTERNAL) |
|
||||
FfxFloat32x2 SampleLockStatus(FfxFloat32x2 fUV) |
|
||||
{ |
|
||||
FfxFloat32x2 fLockStatus = r_lock_status.SampleLevel(s_LinearClamp, fUV, 0); |
|
||||
return fLockStatus; |
|
||||
} |
|
||||
#endif |
|
||||
|
|
||||
#if defined(FSR2_BIND_SRV_RECONSTRUCTED_PREV_NEAREST_DEPTH) || defined(FFX_INTERNAL) |
|
||||
FfxFloat32 LoadReconstructedPrevDepth(FfxUInt32x2 iPxPos) |
|
||||
{ |
|
||||
return asfloat(r_reconstructed_previous_nearest_depth[iPxPos]); |
|
||||
} |
|
||||
#endif |
|
||||
|
|
||||
#if defined(FSR2_BIND_UAV_RECONSTRUCTED_PREV_NEAREST_DEPTH) || defined(FFX_INTERNAL) |
|
||||
void StoreReconstructedDepth(FfxUInt32x2 iPxSample, FfxFloat32 fDepth) |
|
||||
{ |
|
||||
FfxUInt32 uDepth = asuint(fDepth); |
|
||||
|
|
||||
#if FFX_FSR2_OPTION_INVERTED_DEPTH |
|
||||
InterlockedMax(rw_reconstructed_previous_nearest_depth[iPxSample], uDepth); |
|
||||
#else |
|
||||
InterlockedMin(rw_reconstructed_previous_nearest_depth[iPxSample], uDepth); // min for standard, max for inverted depth |
|
||||
#endif |
|
||||
} |
|
||||
#endif |
|
||||
|
|
||||
#if defined(FSR2_BIND_UAV_RECONSTRUCTED_PREV_NEAREST_DEPTH) || defined(FFX_INTERNAL) |
|
||||
void SetReconstructedDepth(FfxUInt32x2 iPxSample, const FfxUInt32 uValue) |
|
||||
{ |
|
||||
rw_reconstructed_previous_nearest_depth[iPxSample] = uValue; |
|
||||
} |
|
||||
#endif |
|
||||
|
|
||||
#if defined(FSR2_BIND_UAV_DILATED_DEPTH) || defined(FFX_INTERNAL) |
|
||||
void StoreDilatedDepth(FFX_PARAMETER_IN FfxUInt32x2 iPxPos, FFX_PARAMETER_IN FfxFloat32 fDepth) |
|
||||
{ |
|
||||
rw_dilatedDepth[iPxPos] = fDepth; |
|
||||
} |
|
||||
#endif |
|
||||
|
|
||||
#if defined(FSR2_BIND_UAV_DILATED_MOTION_VECTORS) || defined(FFX_INTERNAL) |
|
||||
void StoreDilatedMotionVector(FFX_PARAMETER_IN FfxUInt32x2 iPxPos, FFX_PARAMETER_IN FfxFloat32x2 fMotionVector) |
|
||||
{ |
|
||||
rw_dilated_motion_vectors[iPxPos] = fMotionVector; |
|
||||
} |
|
||||
#endif |
|
||||
|
|
||||
#if defined(FSR2_BIND_SRV_DILATED_MOTION_VECTORS) || defined(FFX_INTERNAL) |
|
||||
FfxFloat32x2 LoadDilatedMotionVector(FfxUInt32x2 iPxInput) |
|
||||
{ |
|
||||
return r_dilated_motion_vectors[iPxInput].xy; |
|
||||
} |
|
||||
#endif |
|
||||
|
|
||||
#if defined(FSR2_BIND_SRV_PREVIOUS_DILATED_MOTION_VECTORS) || defined(FFX_INTERNAL) |
|
||||
FfxFloat32x2 LoadPreviousDilatedMotionVector(FfxUInt32x2 iPxInput) |
|
||||
{ |
|
||||
return r_previous_dilated_motion_vectors[iPxInput].xy; |
|
||||
} |
|
||||
|
|
||||
FfxFloat32x2 SamplePreviousDilatedMotionVector(FfxFloat32x2 uv) |
|
||||
{ |
|
||||
return r_previous_dilated_motion_vectors.SampleLevel(s_LinearClamp, uv, 0).xy; |
|
||||
} |
|
||||
#endif |
|
||||
|
|
||||
#if defined(FSR2_BIND_SRV_DILATED_DEPTH) || defined(FFX_INTERNAL) |
|
||||
FfxFloat32 LoadDilatedDepth(FfxUInt32x2 iPxInput) |
|
||||
{ |
|
||||
return r_dilatedDepth[iPxInput]; |
|
||||
} |
|
||||
#endif |
|
||||
|
|
||||
#if defined(FSR2_BIND_SRV_INPUT_EXPOSURE) || defined(FFX_INTERNAL) |
|
||||
FfxFloat32 Exposure() |
|
||||
{ |
|
||||
FfxFloat32 exposure = r_input_exposure[FfxUInt32x2(0, 0)].x; |
|
||||
|
|
||||
if (exposure == 0.0f) { |
|
||||
exposure = 1.0f; |
|
||||
} |
|
||||
|
|
||||
return exposure; |
|
||||
} |
|
||||
#endif |
|
||||
|
|
||||
#if defined(FSR2_BIND_SRV_AUTO_EXPOSURE) || defined(FFX_INTERNAL) |
|
||||
FfxFloat32 AutoExposure() |
|
||||
{ |
|
||||
FfxFloat32 exposure = r_auto_exposure[FfxUInt32x2(0, 0)].x; |
|
||||
|
|
||||
if (exposure == 0.0f) { |
|
||||
exposure = 1.0f; |
|
||||
} |
|
||||
|
|
||||
return exposure; |
|
||||
} |
|
||||
#endif |
|
||||
|
|
||||
FfxFloat32 SampleLanczos2Weight(FfxFloat32 x) |
|
||||
{ |
|
||||
#if defined(FSR2_BIND_SRV_LANCZOS_LUT) || defined(FFX_INTERNAL) |
|
||||
return r_lanczos_lut.SampleLevel(s_LinearClamp, FfxFloat32x2(x / 2, 0.5f), 0); |
|
||||
#else |
|
||||
return 0.f; |
|
||||
#endif |
|
||||
} |
|
||||
|
|
||||
#if defined(FSR2_BIND_SRV_UPSCALE_MAXIMUM_BIAS_LUT) || defined(FFX_INTERNAL) |
|
||||
FfxFloat32 SampleUpsampleMaximumBias(FfxFloat32x2 uv) |
|
||||
{ |
|
||||
// Stored as a SNORM, so make sure to multiply by 2 to retrieve the actual expected range. |
|
||||
return FfxFloat32(2.0) * r_upsample_maximum_bias_lut.SampleLevel(s_LinearClamp, abs(uv) * 2.0, 0); |
|
||||
} |
|
||||
#endif |
|
||||
|
|
||||
#if defined(FSR2_BIND_SRV_DILATED_REACTIVE_MASKS) || defined(FFX_INTERNAL) |
|
||||
FfxFloat32x2 SampleDilatedReactiveMasks(FfxFloat32x2 fUV) |
|
||||
{ |
|
||||
return r_dilated_reactive_masks.SampleLevel(s_LinearClamp, fUV, 0); |
|
||||
} |
|
||||
#endif |
|
||||
|
|
||||
#if defined(FSR2_BIND_SRV_DILATED_REACTIVE_MASKS) || defined(FFX_INTERNAL) |
|
||||
FfxFloat32x2 LoadDilatedReactiveMasks(FFX_PARAMETER_IN FfxUInt32x2 iPxPos) |
|
||||
{ |
|
||||
return r_dilated_reactive_masks[iPxPos]; |
|
||||
} |
|
||||
#endif |
|
||||
|
|
||||
#if defined(FSR2_BIND_UAV_DILATED_REACTIVE_MASKS) || defined(FFX_INTERNAL) |
|
||||
void StoreDilatedReactiveMasks(FFX_PARAMETER_IN FfxUInt32x2 iPxPos, FFX_PARAMETER_IN FfxFloat32x2 fDilatedReactiveMasks) |
|
||||
{ |
|
||||
rw_dilated_reactive_masks[iPxPos] = fDilatedReactiveMasks; |
|
||||
} |
|
||||
#endif |
|
||||
|
|
||||
#if defined(FSR2_BIND_SRV_INPUT_OPAQUE_ONLY) || defined(FFX_INTERNAL) |
|
||||
FfxFloat32x3 LoadOpaqueOnly(FFX_PARAMETER_IN FFX_MIN16_I2 iPxPos) |
|
||||
{ |
|
||||
return r_input_opaque_only[UNITY_FSR2_POS(iPxPos)].xyz; |
|
||||
} |
|
||||
#endif |
|
||||
|
|
||||
#if defined(FSR2_BIND_SRV_PREV_PRE_ALPHA_COLOR) || defined(FFX_INTERNAL) |
|
||||
FfxFloat32x3 LoadPrevPreAlpha(FFX_PARAMETER_IN FFX_MIN16_I2 iPxPos) |
|
||||
{ |
|
||||
return r_input_prev_color_pre_alpha[iPxPos]; |
|
||||
} |
|
||||
#endif |
|
||||
|
|
||||
#if defined(FSR2_BIND_SRV_PREV_POST_ALPHA_COLOR) || defined(FFX_INTERNAL) |
|
||||
FfxFloat32x3 LoadPrevPostAlpha(FFX_PARAMETER_IN FFX_MIN16_I2 iPxPos) |
|
||||
{ |
|
||||
return r_input_prev_color_post_alpha[iPxPos]; |
|
||||
} |
|
||||
#endif |
|
||||
|
|
||||
#if defined(FSR2_BIND_UAV_AUTOREACTIVE) || defined(FFX_INTERNAL) |
|
||||
#if defined(FSR2_BIND_UAV_AUTOCOMPOSITION) || defined(FFX_INTERNAL) |
|
||||
void StoreAutoReactive(FFX_PARAMETER_IN FFX_MIN16_I2 iPxPos, FFX_PARAMETER_IN FFX_MIN16_F2 fReactive) |
|
||||
{ |
|
||||
rw_output_autoreactive[iPxPos] = fReactive.x; |
|
||||
|
|
||||
rw_output_autocomposition[iPxPos] = fReactive.y; |
|
||||
} |
|
||||
#endif |
|
||||
#endif |
|
||||
|
|
||||
#if defined(FSR2_BIND_UAV_PREV_PRE_ALPHA_COLOR) || defined(FFX_INTERNAL) |
|
||||
void StorePrevPreAlpha(FFX_PARAMETER_IN FFX_MIN16_I2 iPxPos, FFX_PARAMETER_IN FFX_MIN16_F3 color) |
|
||||
{ |
|
||||
rw_output_prev_color_pre_alpha[iPxPos] = color; |
|
||||
|
|
||||
} |
|
||||
#endif |
|
||||
|
|
||||
#if defined(FSR2_BIND_UAV_PREV_POST_ALPHA_COLOR) || defined(FFX_INTERNAL) |
|
||||
void StorePrevPostAlpha(FFX_PARAMETER_IN FFX_MIN16_I2 iPxPos, FFX_PARAMETER_IN FFX_MIN16_F3 color) |
|
||||
{ |
|
||||
rw_output_prev_color_post_alpha[iPxPos] = color; |
|
||||
} |
|
||||
#endif |
|
||||
|
|
||||
#endif // #if defined(FFX_GPU) |
|
||||
@ -1,60 +0,0 @@ |
|||||
fileFormatVersion: 2 |
|
||||
guid: eb121968296f9ba44b35d7e18d2b79df |
|
||||
PluginImporter: |
|
||||
externalObjects: {} |
|
||||
serializedVersion: 2 |
|
||||
iconMap: {} |
|
||||
executionOrder: {} |
|
||||
defineConstraints: [] |
|
||||
isPreloaded: 0 |
|
||||
isOverridable: 0 |
|
||||
isExplicitlyReferenced: 0 |
|
||||
validateReferences: 1 |
|
||||
platformData: |
|
||||
- first: |
|
||||
: Any |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: |
|
||||
Exclude Editor: 1 |
|
||||
Exclude GameCoreScarlett: 1 |
|
||||
Exclude GameCoreXboxOne: 1 |
|
||||
Exclude Linux64: 1 |
|
||||
Exclude OSXUniversal: 1 |
|
||||
Exclude PS4: 1 |
|
||||
Exclude PS5: 1 |
|
||||
Exclude WebGL: 1 |
|
||||
Exclude Win: 1 |
|
||||
Exclude Win64: 1 |
|
||||
- first: |
|
||||
Any: |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: {} |
|
||||
- first: |
|
||||
Editor: Editor |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: |
|
||||
DefaultValueInitialized: true |
|
||||
- first: |
|
||||
Standalone: Linux64 |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: |
|
||||
CPU: None |
|
||||
- first: |
|
||||
Standalone: Win |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: |
|
||||
CPU: None |
|
||||
- first: |
|
||||
Standalone: Win64 |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: |
|
||||
CPU: None |
|
||||
userData: |
|
||||
assetBundleName: |
|
||||
assetBundleVariant: |
|
||||
@ -1,60 +0,0 @@ |
|||||
fileFormatVersion: 2 |
|
||||
guid: 2176dca22b6e9604da8329c79abae68d |
|
||||
PluginImporter: |
|
||||
externalObjects: {} |
|
||||
serializedVersion: 2 |
|
||||
iconMap: {} |
|
||||
executionOrder: {} |
|
||||
defineConstraints: [] |
|
||||
isPreloaded: 0 |
|
||||
isOverridable: 0 |
|
||||
isExplicitlyReferenced: 0 |
|
||||
validateReferences: 1 |
|
||||
platformData: |
|
||||
- first: |
|
||||
: Any |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: |
|
||||
Exclude Editor: 1 |
|
||||
Exclude GameCoreScarlett: 1 |
|
||||
Exclude GameCoreXboxOne: 1 |
|
||||
Exclude Linux64: 1 |
|
||||
Exclude OSXUniversal: 1 |
|
||||
Exclude PS4: 1 |
|
||||
Exclude PS5: 1 |
|
||||
Exclude WebGL: 1 |
|
||||
Exclude Win: 1 |
|
||||
Exclude Win64: 1 |
|
||||
- first: |
|
||||
Any: |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: {} |
|
||||
- first: |
|
||||
Editor: Editor |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: |
|
||||
DefaultValueInitialized: true |
|
||||
- first: |
|
||||
Standalone: Linux64 |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: |
|
||||
CPU: None |
|
||||
- first: |
|
||||
Standalone: Win |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: |
|
||||
CPU: None |
|
||||
- first: |
|
||||
Standalone: Win64 |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: |
|
||||
CPU: None |
|
||||
userData: |
|
||||
assetBundleName: |
|
||||
assetBundleVariant: |
|
||||
@ -1,60 +0,0 @@ |
|||||
fileFormatVersion: 2 |
|
||||
guid: dbcdb6dfb36311a49aa7b05bc5054280 |
|
||||
PluginImporter: |
|
||||
externalObjects: {} |
|
||||
serializedVersion: 2 |
|
||||
iconMap: {} |
|
||||
executionOrder: {} |
|
||||
defineConstraints: [] |
|
||||
isPreloaded: 0 |
|
||||
isOverridable: 0 |
|
||||
isExplicitlyReferenced: 0 |
|
||||
validateReferences: 1 |
|
||||
platformData: |
|
||||
- first: |
|
||||
: Any |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: |
|
||||
Exclude Editor: 1 |
|
||||
Exclude GameCoreScarlett: 1 |
|
||||
Exclude GameCoreXboxOne: 1 |
|
||||
Exclude Linux64: 1 |
|
||||
Exclude OSXUniversal: 1 |
|
||||
Exclude PS4: 1 |
|
||||
Exclude PS5: 1 |
|
||||
Exclude WebGL: 1 |
|
||||
Exclude Win: 1 |
|
||||
Exclude Win64: 1 |
|
||||
- first: |
|
||||
Any: |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: {} |
|
||||
- first: |
|
||||
Editor: Editor |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: |
|
||||
DefaultValueInitialized: true |
|
||||
- first: |
|
||||
Standalone: Linux64 |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: |
|
||||
CPU: None |
|
||||
- first: |
|
||||
Standalone: Win |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: |
|
||||
CPU: None |
|
||||
- first: |
|
||||
Standalone: Win64 |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: |
|
||||
CPU: None |
|
||||
userData: |
|
||||
assetBundleName: |
|
||||
assetBundleVariant: |
|
||||
@ -1,131 +0,0 @@ |
|||||
// This file is part of the FidelityFX SDK. |
|
||||
// |
|
||||
// Copyright (c) 2022-2023 Advanced Micro Devices, Inc. All rights reserved. |
|
||||
// |
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy |
|
||||
// of this software and associated documentation files (the "Software"), to deal |
|
||||
// in the Software without restriction, including without limitation the rights |
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
|
||||
// copies of the Software, and to permit persons to whom the Software is |
|
||||
// furnished to do so, subject to the following conditions: |
|
||||
// The above copyright notice and this permission notice shall be included in |
|
||||
// all copies or substantial portions of the Software. |
|
||||
// |
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
|
||||
// THE SOFTWARE. |
|
||||
|
|
||||
#define FSR2_BIND_SRV_INPUT_COLOR 0 |
|
||||
#define FSR2_BIND_UAV_SPD_GLOBAL_ATOMIC 0 |
|
||||
#define FSR2_BIND_UAV_EXPOSURE_MIP_LUMA_CHANGE 1 |
|
||||
#define FSR2_BIND_UAV_EXPOSURE_MIP_5 2 |
|
||||
#define FSR2_BIND_UAV_AUTO_EXPOSURE 3 |
|
||||
#define FSR2_BIND_CB_FSR2 0 |
|
||||
#define FSR2_BIND_CB_SPD 1 |
|
||||
|
|
||||
#include "ffx_fsr2_callbacks_hlsl.h" |
|
||||
#include "ffx_fsr2_common.h" |
|
||||
|
|
||||
#if defined(FSR2_BIND_CB_SPD) |
|
||||
cbuffer cbSPD : FFX_FSR2_DECLARE_CB(FSR2_BIND_CB_SPD) { |
|
||||
|
|
||||
FfxUInt32 mips; |
|
||||
FfxUInt32 numWorkGroups; |
|
||||
FfxUInt32x2 workGroupOffset; |
|
||||
FfxUInt32x2 renderSize; |
|
||||
}; |
|
||||
|
|
||||
FfxUInt32 MipCount() |
|
||||
{ |
|
||||
return mips; |
|
||||
} |
|
||||
|
|
||||
FfxUInt32 NumWorkGroups() |
|
||||
{ |
|
||||
return numWorkGroups; |
|
||||
} |
|
||||
|
|
||||
FfxUInt32x2 WorkGroupOffset() |
|
||||
{ |
|
||||
return workGroupOffset; |
|
||||
} |
|
||||
|
|
||||
FfxUInt32x2 SPD_RenderSize() |
|
||||
{ |
|
||||
return renderSize; |
|
||||
} |
|
||||
#endif |
|
||||
|
|
||||
|
|
||||
FfxFloat32x2 SPD_LoadExposureBuffer() |
|
||||
{ |
|
||||
return rw_auto_exposure[FfxInt32x2(0,0)]; |
|
||||
} |
|
||||
|
|
||||
void SPD_SetExposureBuffer(FfxFloat32x2 value) |
|
||||
{ |
|
||||
rw_auto_exposure[FfxInt32x2(0,0)] = value; |
|
||||
} |
|
||||
|
|
||||
FfxFloat32x4 SPD_LoadMipmap5(FfxInt32x2 iPxPos) |
|
||||
{ |
|
||||
return FfxFloat32x4(rw_img_mip_5[iPxPos], 0, 0, 0); |
|
||||
} |
|
||||
|
|
||||
void SPD_SetMipmap(FfxInt32x2 iPxPos, FfxInt32 slice, FfxFloat32 value) |
|
||||
{ |
|
||||
switch (slice) |
|
||||
{ |
|
||||
case FFX_FSR2_SHADING_CHANGE_MIP_LEVEL: |
|
||||
rw_img_mip_shading_change[iPxPos] = value; |
|
||||
break; |
|
||||
case 5: |
|
||||
rw_img_mip_5[iPxPos] = value; |
|
||||
break; |
|
||||
default: |
|
||||
|
|
||||
// avoid flattened side effect |
|
||||
#if defined(FSR2_BIND_UAV_EXPOSURE_MIP_LUMA_CHANGE) || defined(FFX_INTERNAL) |
|
||||
rw_img_mip_shading_change[iPxPos] = rw_img_mip_shading_change[iPxPos]; |
|
||||
#elif defined(FSR2_BIND_UAV_EXPOSURE_MIP_5) || defined(FFX_INTERNAL) |
|
||||
rw_img_mip_5[iPxPos] = rw_img_mip_5[iPxPos]; |
|
||||
#endif |
|
||||
break; |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
void SPD_IncreaseAtomicCounter(inout FfxUInt32 spdCounter) |
|
||||
{ |
|
||||
InterlockedAdd(rw_spd_global_atomic[FfxInt32x2(0,0)], 1, spdCounter); |
|
||||
} |
|
||||
|
|
||||
void SPD_ResetAtomicCounter() |
|
||||
{ |
|
||||
rw_spd_global_atomic[FfxInt32x2(0,0)] = 0; |
|
||||
} |
|
||||
|
|
||||
#include "ffx_fsr2_compute_luminance_pyramid.h" |
|
||||
|
|
||||
#ifndef FFX_FSR2_THREAD_GROUP_WIDTH |
|
||||
#define FFX_FSR2_THREAD_GROUP_WIDTH 256 |
|
||||
#endif // #ifndef FFX_FSR2_THREAD_GROUP_WIDTH |
|
||||
#ifndef FFX_FSR2_THREAD_GROUP_HEIGHT |
|
||||
#define FFX_FSR2_THREAD_GROUP_HEIGHT 1 |
|
||||
#endif // #ifndef FFX_FSR2_THREAD_GROUP_HEIGHT |
|
||||
#ifndef FFX_FSR2_THREAD_GROUP_DEPTH |
|
||||
#define FFX_FSR2_THREAD_GROUP_DEPTH 1 |
|
||||
#endif // #ifndef FFX_FSR2_THREAD_GROUP_DEPTH |
|
||||
#ifndef FFX_FSR2_NUM_THREADS |
|
||||
#define FFX_FSR2_NUM_THREADS [numthreads(FFX_FSR2_THREAD_GROUP_WIDTH, FFX_FSR2_THREAD_GROUP_HEIGHT, FFX_FSR2_THREAD_GROUP_DEPTH)] |
|
||||
#endif // #ifndef FFX_FSR2_NUM_THREADS |
|
||||
|
|
||||
FFX_FSR2_NUM_THREADS |
|
||||
FFX_FSR2_EMBED_CB2_ROOTSIG_CONTENT |
|
||||
void CS(uint3 WorkGroupId : SV_GroupID, uint LocalThreadIndex : SV_GroupIndex) |
|
||||
{ |
|
||||
ComputeAutoExposure(WorkGroupId, LocalThreadIndex); |
|
||||
} |
|
||||
@ -1,60 +0,0 @@ |
|||||
fileFormatVersion: 2 |
|
||||
guid: f7c16477aeb3a9b4f94f4ef818d10d9b |
|
||||
PluginImporter: |
|
||||
externalObjects: {} |
|
||||
serializedVersion: 2 |
|
||||
iconMap: {} |
|
||||
executionOrder: {} |
|
||||
defineConstraints: [] |
|
||||
isPreloaded: 0 |
|
||||
isOverridable: 0 |
|
||||
isExplicitlyReferenced: 0 |
|
||||
validateReferences: 1 |
|
||||
platformData: |
|
||||
- first: |
|
||||
: Any |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: |
|
||||
Exclude Editor: 1 |
|
||||
Exclude GameCoreScarlett: 1 |
|
||||
Exclude GameCoreXboxOne: 1 |
|
||||
Exclude Linux64: 1 |
|
||||
Exclude OSXUniversal: 1 |
|
||||
Exclude PS4: 1 |
|
||||
Exclude PS5: 1 |
|
||||
Exclude WebGL: 1 |
|
||||
Exclude Win: 1 |
|
||||
Exclude Win64: 1 |
|
||||
- first: |
|
||||
Any: |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: {} |
|
||||
- first: |
|
||||
Editor: Editor |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: |
|
||||
DefaultValueInitialized: true |
|
||||
- first: |
|
||||
Standalone: Linux64 |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: |
|
||||
CPU: None |
|
||||
- first: |
|
||||
Standalone: Win |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: |
|
||||
CPU: None |
|
||||
- first: |
|
||||
Standalone: Win64 |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: |
|
||||
CPU: None |
|
||||
userData: |
|
||||
assetBundleName: |
|
||||
assetBundleVariant: |
|
||||
@ -1,66 +0,0 @@ |
|||||
// This file is part of the FidelityFX SDK. |
|
||||
// |
|
||||
// Copyright (c) 2022-2023 Advanced Micro Devices, Inc. All rights reserved. |
|
||||
// |
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy |
|
||||
// of this software and associated documentation files (the "Software"), to deal |
|
||||
// in the Software without restriction, including without limitation the rights |
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
|
||||
// copies of the Software, and to permit persons to whom the Software is |
|
||||
// furnished to do so, subject to the following conditions: |
|
||||
// The above copyright notice and this permission notice shall be included in |
|
||||
// all copies or substantial portions of the Software. |
|
||||
// |
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
|
||||
// THE SOFTWARE. |
|
||||
|
|
||||
#define FSR2_BIND_SRV_RECONSTRUCTED_PREV_NEAREST_DEPTH 0 |
|
||||
#define FSR2_BIND_SRV_DILATED_MOTION_VECTORS 1 |
|
||||
#define FSR2_BIND_SRV_DILATED_DEPTH 2 |
|
||||
#define FSR2_BIND_SRV_REACTIVE_MASK 3 |
|
||||
#define FSR2_BIND_SRV_TRANSPARENCY_AND_COMPOSITION_MASK 4 |
|
||||
#define FSR2_BIND_SRV_PREVIOUS_DILATED_MOTION_VECTORS 5 |
|
||||
#define FSR2_BIND_SRV_INPUT_MOTION_VECTORS 6 |
|
||||
#define FSR2_BIND_SRV_INPUT_COLOR 7 |
|
||||
#define FSR2_BIND_SRV_INPUT_DEPTH 8 |
|
||||
#define FSR2_BIND_SRV_INPUT_EXPOSURE 9 |
|
||||
|
|
||||
#define FSR2_BIND_UAV_DILATED_REACTIVE_MASKS 0 |
|
||||
#define FSR2_BIND_UAV_PREPARED_INPUT_COLOR 1 |
|
||||
|
|
||||
#define FSR2_BIND_CB_FSR2 0 |
|
||||
|
|
||||
#include "ffx_fsr2_callbacks_hlsl.h" |
|
||||
#include "ffx_fsr2_common.h" |
|
||||
#include "ffx_fsr2_sample.h" |
|
||||
#include "ffx_fsr2_depth_clip.h" |
|
||||
|
|
||||
#ifndef FFX_FSR2_THREAD_GROUP_WIDTH |
|
||||
#define FFX_FSR2_THREAD_GROUP_WIDTH 8 |
|
||||
#endif // #ifndef FFX_FSR2_THREAD_GROUP_WIDTH |
|
||||
#ifndef FFX_FSR2_THREAD_GROUP_HEIGHT |
|
||||
#define FFX_FSR2_THREAD_GROUP_HEIGHT 8 |
|
||||
#endif // #ifndef FFX_FSR2_THREAD_GROUP_HEIGHT |
|
||||
#ifndef FFX_FSR2_THREAD_GROUP_DEPTH |
|
||||
#define FFX_FSR2_THREAD_GROUP_DEPTH 1 |
|
||||
#endif // #ifndef FFX_FSR2_THREAD_GROUP_DEPTH |
|
||||
#ifndef FFX_FSR2_NUM_THREADS |
|
||||
#define FFX_FSR2_NUM_THREADS [numthreads(FFX_FSR2_THREAD_GROUP_WIDTH, FFX_FSR2_THREAD_GROUP_HEIGHT, FFX_FSR2_THREAD_GROUP_DEPTH)] |
|
||||
#endif // #ifndef FFX_FSR2_NUM_THREADS |
|
||||
|
|
||||
FFX_FSR2_PREFER_WAVE64 |
|
||||
FFX_FSR2_NUM_THREADS |
|
||||
FFX_FSR2_EMBED_ROOTSIG_CONTENT |
|
||||
void CS( |
|
||||
int2 iGroupId : SV_GroupID, |
|
||||
int2 iDispatchThreadId : SV_DispatchThreadID, |
|
||||
int2 iGroupThreadId : SV_GroupThreadID, |
|
||||
int iGroupIndex : SV_GroupIndex) |
|
||||
{ |
|
||||
DepthClip(iDispatchThreadId); |
|
||||
} |
|
||||
@ -1,60 +0,0 @@ |
|||||
fileFormatVersion: 2 |
|
||||
guid: 9b4cdc5f81194ac4fa946c31b86234ed |
|
||||
PluginImporter: |
|
||||
externalObjects: {} |
|
||||
serializedVersion: 2 |
|
||||
iconMap: {} |
|
||||
executionOrder: {} |
|
||||
defineConstraints: [] |
|
||||
isPreloaded: 0 |
|
||||
isOverridable: 0 |
|
||||
isExplicitlyReferenced: 0 |
|
||||
validateReferences: 1 |
|
||||
platformData: |
|
||||
- first: |
|
||||
: Any |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: |
|
||||
Exclude Editor: 1 |
|
||||
Exclude GameCoreScarlett: 1 |
|
||||
Exclude GameCoreXboxOne: 1 |
|
||||
Exclude Linux64: 1 |
|
||||
Exclude OSXUniversal: 1 |
|
||||
Exclude PS4: 1 |
|
||||
Exclude PS5: 1 |
|
||||
Exclude WebGL: 1 |
|
||||
Exclude Win: 1 |
|
||||
Exclude Win64: 1 |
|
||||
- first: |
|
||||
Any: |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: {} |
|
||||
- first: |
|
||||
Editor: Editor |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: |
|
||||
DefaultValueInitialized: true |
|
||||
- first: |
|
||||
Standalone: Linux64 |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: |
|
||||
CPU: None |
|
||||
- first: |
|
||||
Standalone: Win |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: |
|
||||
CPU: None |
|
||||
- first: |
|
||||
Standalone: Win64 |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: |
|
||||
CPU: None |
|
||||
userData: |
|
||||
assetBundleName: |
|
||||
assetBundleVariant: |
|
||||
@ -1,53 +0,0 @@ |
|||||
// This file is part of the FidelityFX SDK. |
|
||||
// |
|
||||
// Copyright (c) 2022-2023 Advanced Micro Devices, Inc. All rights reserved. |
|
||||
// |
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy |
|
||||
// of this software and associated documentation files (the "Software"), to deal |
|
||||
// in the Software without restriction, including without limitation the rights |
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
|
||||
// copies of the Software, and to permit persons to whom the Software is |
|
||||
// furnished to do so, subject to the following conditions: |
|
||||
// The above copyright notice and this permission notice shall be included in |
|
||||
// all copies or substantial portions of the Software. |
|
||||
// |
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
|
||||
// THE SOFTWARE. |
|
||||
|
|
||||
#define FSR2_BIND_SRV_LOCK_INPUT_LUMA 0 |
|
||||
#define FSR2_BIND_UAV_NEW_LOCKS 0 |
|
||||
#define FSR2_BIND_UAV_RECONSTRUCTED_PREV_NEAREST_DEPTH 1 |
|
||||
#define FSR2_BIND_CB_FSR2 0 |
|
||||
|
|
||||
#include "ffx_fsr2_callbacks_hlsl.h" |
|
||||
#include "ffx_fsr2_common.h" |
|
||||
#include "ffx_fsr2_sample.h" |
|
||||
#include "ffx_fsr2_lock.h" |
|
||||
|
|
||||
#ifndef FFX_FSR2_THREAD_GROUP_WIDTH |
|
||||
#define FFX_FSR2_THREAD_GROUP_WIDTH 8 |
|
||||
#endif // #ifndef FFX_FSR2_THREAD_GROUP_WIDTH |
|
||||
#ifndef FFX_FSR2_THREAD_GROUP_HEIGHT |
|
||||
#define FFX_FSR2_THREAD_GROUP_HEIGHT 8 |
|
||||
#endif // #ifndef FFX_FSR2_THREAD_GROUP_HEIGHT |
|
||||
#ifndef FFX_FSR2_THREAD_GROUP_DEPTH |
|
||||
#define FFX_FSR2_THREAD_GROUP_DEPTH 1 |
|
||||
#endif // #ifndef FFX_FSR2_THREAD_GROUP_DEPTH |
|
||||
#ifndef FFX_FSR2_NUM_THREADS |
|
||||
#define FFX_FSR2_NUM_THREADS [numthreads(FFX_FSR2_THREAD_GROUP_WIDTH, FFX_FSR2_THREAD_GROUP_HEIGHT, FFX_FSR2_THREAD_GROUP_DEPTH)] |
|
||||
#endif // #ifndef FFX_FSR2_NUM_THREADS |
|
||||
|
|
||||
FFX_FSR2_PREFER_WAVE64 |
|
||||
FFX_FSR2_NUM_THREADS |
|
||||
FFX_FSR2_EMBED_ROOTSIG_CONTENT |
|
||||
void CS(uint2 uGroupId : SV_GroupID, uint2 uGroupThreadId : SV_GroupThreadID) |
|
||||
{ |
|
||||
uint2 uDispatchThreadId = uGroupId * uint2(FFX_FSR2_THREAD_GROUP_WIDTH, FFX_FSR2_THREAD_GROUP_HEIGHT) + uGroupThreadId; |
|
||||
|
|
||||
ComputeLock(uDispatchThreadId); |
|
||||
} |
|
||||
@ -1,7 +0,0 @@ |
|||||
fileFormatVersion: 2 |
|
||||
guid: 471a3f7a033c72f4fa737d4f8238a9bd |
|
||||
ShaderIncludeImporter: |
|
||||
externalObjects: {} |
|
||||
userData: |
|
||||
assetBundleName: |
|
||||
assetBundleVariant: |
|
||||
@ -1,60 +0,0 @@ |
|||||
fileFormatVersion: 2 |
|
||||
guid: 3945c3cfd2cc1a64cb0513864d88d8ca |
|
||||
PluginImporter: |
|
||||
externalObjects: {} |
|
||||
serializedVersion: 2 |
|
||||
iconMap: {} |
|
||||
executionOrder: {} |
|
||||
defineConstraints: [] |
|
||||
isPreloaded: 0 |
|
||||
isOverridable: 0 |
|
||||
isExplicitlyReferenced: 0 |
|
||||
validateReferences: 1 |
|
||||
platformData: |
|
||||
- first: |
|
||||
: Any |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: |
|
||||
Exclude Editor: 1 |
|
||||
Exclude GameCoreScarlett: 1 |
|
||||
Exclude GameCoreXboxOne: 1 |
|
||||
Exclude Linux64: 1 |
|
||||
Exclude OSXUniversal: 1 |
|
||||
Exclude PS4: 1 |
|
||||
Exclude PS5: 1 |
|
||||
Exclude WebGL: 1 |
|
||||
Exclude Win: 1 |
|
||||
Exclude Win64: 1 |
|
||||
- first: |
|
||||
Any: |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: {} |
|
||||
- first: |
|
||||
Editor: Editor |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: |
|
||||
DefaultValueInitialized: true |
|
||||
- first: |
|
||||
Standalone: Linux64 |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: |
|
||||
CPU: None |
|
||||
- first: |
|
||||
Standalone: Win |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: |
|
||||
CPU: None |
|
||||
- first: |
|
||||
Standalone: Win64 |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: |
|
||||
CPU: None |
|
||||
userData: |
|
||||
assetBundleName: |
|
||||
assetBundleVariant: |
|
||||
@ -1,60 +0,0 @@ |
|||||
fileFormatVersion: 2 |
|
||||
guid: 7bd7d4eb34c626342966cb9b3fe00363 |
|
||||
PluginImporter: |
|
||||
externalObjects: {} |
|
||||
serializedVersion: 2 |
|
||||
iconMap: {} |
|
||||
executionOrder: {} |
|
||||
defineConstraints: [] |
|
||||
isPreloaded: 0 |
|
||||
isOverridable: 0 |
|
||||
isExplicitlyReferenced: 0 |
|
||||
validateReferences: 1 |
|
||||
platformData: |
|
||||
- first: |
|
||||
: Any |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: |
|
||||
Exclude Editor: 1 |
|
||||
Exclude GameCoreScarlett: 1 |
|
||||
Exclude GameCoreXboxOne: 1 |
|
||||
Exclude Linux64: 1 |
|
||||
Exclude OSXUniversal: 1 |
|
||||
Exclude PS4: 1 |
|
||||
Exclude PS5: 1 |
|
||||
Exclude WebGL: 1 |
|
||||
Exclude Win: 1 |
|
||||
Exclude Win64: 1 |
|
||||
- first: |
|
||||
Any: |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: {} |
|
||||
- first: |
|
||||
Editor: Editor |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: |
|
||||
DefaultValueInitialized: true |
|
||||
- first: |
|
||||
Standalone: Linux64 |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: |
|
||||
CPU: None |
|
||||
- first: |
|
||||
Standalone: Win |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: |
|
||||
CPU: None |
|
||||
- first: |
|
||||
Standalone: Win64 |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: |
|
||||
CPU: None |
|
||||
userData: |
|
||||
assetBundleName: |
|
||||
assetBundleVariant: |
|
||||
@ -1,75 +0,0 @@ |
|||||
// This file is part of the FidelityFX SDK. |
|
||||
// |
|
||||
// Copyright (c) 2022-2023 Advanced Micro Devices, Inc. All rights reserved. |
|
||||
// |
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy |
|
||||
// of this software and associated documentation files (the "Software"), to deal |
|
||||
// in the Software without restriction, including without limitation the rights |
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
|
||||
// copies of the Software, and to permit persons to whom the Software is |
|
||||
// furnished to do so, subject to the following conditions: |
|
||||
// The above copyright notice and this permission notice shall be included in |
|
||||
// all copies or substantial portions of the Software. |
|
||||
// |
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
|
||||
// THE SOFTWARE. |
|
||||
|
|
||||
#define FSR2_BIND_SRV_INPUT_EXPOSURE 0 |
|
||||
#define FSR2_BIND_SRV_RCAS_INPUT 1 |
|
||||
#define FSR2_BIND_UAV_UPSCALED_OUTPUT 0 |
|
||||
#define FSR2_BIND_CB_FSR2 0 |
|
||||
#define FSR2_BIND_CB_RCAS 1 |
|
||||
|
|
||||
#include "ffx_fsr2_callbacks_hlsl.h" |
|
||||
#include "ffx_fsr2_common.h" |
|
||||
|
|
||||
//Move to prototype shader! |
|
||||
#if defined(FSR2_BIND_CB_RCAS) |
|
||||
cbuffer cbRCAS : FFX_FSR2_DECLARE_CB(FSR2_BIND_CB_RCAS) |
|
||||
{ |
|
||||
uint4 rcasConfig; |
|
||||
}; |
|
||||
|
|
||||
uint4 RCASConfig() |
|
||||
{ |
|
||||
return rcasConfig; |
|
||||
} |
|
||||
#else |
|
||||
uint4 RCASConfig() |
|
||||
{ |
|
||||
return 0; |
|
||||
} |
|
||||
#endif |
|
||||
|
|
||||
|
|
||||
float4 LoadRCAS_Input(FfxInt32x2 iPxPos) |
|
||||
{ |
|
||||
return r_rcas_input[iPxPos]; |
|
||||
} |
|
||||
|
|
||||
#include "ffx_fsr2_rcas.h" |
|
||||
|
|
||||
#ifndef FFX_FSR2_THREAD_GROUP_WIDTH |
|
||||
#define FFX_FSR2_THREAD_GROUP_WIDTH 64 |
|
||||
#endif // #ifndef FFX_FSR2_THREAD_GROUP_WIDTH |
|
||||
#ifndef FFX_FSR2_THREAD_GROUP_HEIGHT |
|
||||
#define FFX_FSR2_THREAD_GROUP_HEIGHT 1 |
|
||||
#endif // #ifndef FFX_FSR2_THREAD_GROUP_HEIGHT |
|
||||
#ifndef FFX_FSR2_THREAD_GROUP_DEPTH |
|
||||
#define FFX_FSR2_THREAD_GROUP_DEPTH 1 |
|
||||
#endif // #ifndef FFX_FSR2_THREAD_GROUP_DEPTH |
|
||||
#ifndef FFX_FSR2_NUM_THREADS |
|
||||
#define FFX_FSR2_NUM_THREADS [numthreads(FFX_FSR2_THREAD_GROUP_WIDTH, FFX_FSR2_THREAD_GROUP_HEIGHT, FFX_FSR2_THREAD_GROUP_DEPTH)] |
|
||||
#endif // #ifndef FFX_FSR2_NUM_THREADS |
|
||||
|
|
||||
FFX_FSR2_NUM_THREADS |
|
||||
FFX_FSR2_EMBED_CB2_ROOTSIG_CONTENT |
|
||||
void CS(uint3 LocalThreadId : SV_GroupThreadID, uint3 WorkGroupId : SV_GroupID, uint3 Dtid : SV_DispatchThreadID) |
|
||||
{ |
|
||||
RCAS(LocalThreadId, WorkGroupId, Dtid); |
|
||||
} |
|
||||
@ -1,7 +0,0 @@ |
|||||
fileFormatVersion: 2 |
|
||||
guid: 871ca1938c701d64f94ef8ec00ef06f4 |
|
||||
ShaderIncludeImporter: |
|
||||
externalObjects: {} |
|
||||
userData: |
|
||||
assetBundleName: |
|
||||
assetBundleVariant: |
|
||||
@ -1,60 +0,0 @@ |
|||||
fileFormatVersion: 2 |
|
||||
guid: 13cd33c3d34a317409049dfd939e64ef |
|
||||
PluginImporter: |
|
||||
externalObjects: {} |
|
||||
serializedVersion: 2 |
|
||||
iconMap: {} |
|
||||
executionOrder: {} |
|
||||
defineConstraints: [] |
|
||||
isPreloaded: 0 |
|
||||
isOverridable: 0 |
|
||||
isExplicitlyReferenced: 0 |
|
||||
validateReferences: 1 |
|
||||
platformData: |
|
||||
- first: |
|
||||
: Any |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: |
|
||||
Exclude Editor: 1 |
|
||||
Exclude GameCoreScarlett: 1 |
|
||||
Exclude GameCoreXboxOne: 1 |
|
||||
Exclude Linux64: 1 |
|
||||
Exclude OSXUniversal: 1 |
|
||||
Exclude PS4: 1 |
|
||||
Exclude PS5: 1 |
|
||||
Exclude WebGL: 1 |
|
||||
Exclude Win: 1 |
|
||||
Exclude Win64: 1 |
|
||||
- first: |
|
||||
Any: |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: {} |
|
||||
- first: |
|
||||
Editor: Editor |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: |
|
||||
DefaultValueInitialized: true |
|
||||
- first: |
|
||||
Standalone: Linux64 |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: |
|
||||
CPU: None |
|
||||
- first: |
|
||||
Standalone: Win |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: |
|
||||
CPU: None |
|
||||
- first: |
|
||||
Standalone: Win64 |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: |
|
||||
CPU: None |
|
||||
userData: |
|
||||
assetBundleName: |
|
||||
assetBundleVariant: |
|
||||
@ -1,63 +0,0 @@ |
|||||
// This file is part of the FidelityFX SDK. |
|
||||
// |
|
||||
// Copyright (c) 2022-2023 Advanced Micro Devices, Inc. All rights reserved. |
|
||||
// |
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy |
|
||||
// of this software and associated documentation files (the "Software"), to deal |
|
||||
// in the Software without restriction, including without limitation the rights |
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
|
||||
// copies of the Software, and to permit persons to whom the Software is |
|
||||
// furnished to do so, subject to the following conditions: |
|
||||
// The above copyright notice and this permission notice shall be included in |
|
||||
// all copies or substantial portions of the Software. |
|
||||
// |
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
|
||||
// THE SOFTWARE. |
|
||||
|
|
||||
#define FSR2_BIND_SRV_INPUT_MOTION_VECTORS 0 |
|
||||
#define FSR2_BIND_SRV_INPUT_DEPTH 1 |
|
||||
#define FSR2_BIND_SRV_INPUT_COLOR 2 |
|
||||
#define FSR2_BIND_SRV_INPUT_EXPOSURE 3 |
|
||||
|
|
||||
#define FSR2_BIND_UAV_RECONSTRUCTED_PREV_NEAREST_DEPTH 0 |
|
||||
#define FSR2_BIND_UAV_DILATED_MOTION_VECTORS 1 |
|
||||
#define FSR2_BIND_UAV_DILATED_DEPTH 2 |
|
||||
#define FSR2_BIND_UAV_LOCK_INPUT_LUMA 3 |
|
||||
|
|
||||
#define FSR2_BIND_CB_FSR2 0 |
|
||||
|
|
||||
#include "ffx_fsr2_callbacks_hlsl.h" |
|
||||
#include "ffx_fsr2_common.h" |
|
||||
#include "ffx_fsr2_sample.h" |
|
||||
#include "ffx_fsr2_reconstruct_dilated_velocity_and_previous_depth.h" |
|
||||
|
|
||||
#ifndef FFX_FSR2_THREAD_GROUP_WIDTH |
|
||||
#define FFX_FSR2_THREAD_GROUP_WIDTH 8 |
|
||||
#endif // #ifndef FFX_FSR2_THREAD_GROUP_WIDTH |
|
||||
#ifndef FFX_FSR2_THREAD_GROUP_HEIGHT |
|
||||
#define FFX_FSR2_THREAD_GROUP_HEIGHT 8 |
|
||||
#endif // #ifndef FFX_FSR2_THREAD_GROUP_HEIGHT |
|
||||
#ifndef FFX_FSR2_THREAD_GROUP_DEPTH |
|
||||
#define FFX_FSR2_THREAD_GROUP_DEPTH 1 |
|
||||
#endif // #ifndef FFX_FSR2_THREAD_GROUP_DEPTH |
|
||||
#ifndef FFX_FSR2_NUM_THREADS |
|
||||
#define FFX_FSR2_NUM_THREADS [numthreads(FFX_FSR2_THREAD_GROUP_WIDTH, FFX_FSR2_THREAD_GROUP_HEIGHT, FFX_FSR2_THREAD_GROUP_DEPTH)] |
|
||||
#endif // #ifndef FFX_FSR2_NUM_THREADS |
|
||||
|
|
||||
FFX_FSR2_PREFER_WAVE64 |
|
||||
FFX_FSR2_NUM_THREADS |
|
||||
FFX_FSR2_EMBED_ROOTSIG_CONTENT |
|
||||
void CS( |
|
||||
int2 iGroupId : SV_GroupID, |
|
||||
int2 iDispatchThreadId : SV_DispatchThreadID, |
|
||||
int2 iGroupThreadId : SV_GroupThreadID, |
|
||||
int iGroupIndex : SV_GroupIndex |
|
||||
) |
|
||||
{ |
|
||||
ReconstructAndDilate(iDispatchThreadId); |
|
||||
} |
|
||||
@ -1,7 +0,0 @@ |
|||||
fileFormatVersion: 2 |
|
||||
guid: 9355c255c8505ae48ae89af286943747 |
|
||||
ShaderIncludeImporter: |
|
||||
externalObjects: {} |
|
||||
userData: |
|
||||
assetBundleName: |
|
||||
assetBundleVariant: |
|
||||
@ -1,60 +0,0 @@ |
|||||
fileFormatVersion: 2 |
|
||||
guid: 63fc917ca6895cb4aac237ea35edb838 |
|
||||
PluginImporter: |
|
||||
externalObjects: {} |
|
||||
serializedVersion: 2 |
|
||||
iconMap: {} |
|
||||
executionOrder: {} |
|
||||
defineConstraints: [] |
|
||||
isPreloaded: 0 |
|
||||
isOverridable: 0 |
|
||||
isExplicitlyReferenced: 0 |
|
||||
validateReferences: 1 |
|
||||
platformData: |
|
||||
- first: |
|
||||
: Any |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: |
|
||||
Exclude Editor: 1 |
|
||||
Exclude GameCoreScarlett: 1 |
|
||||
Exclude GameCoreXboxOne: 1 |
|
||||
Exclude Linux64: 1 |
|
||||
Exclude OSXUniversal: 1 |
|
||||
Exclude PS4: 1 |
|
||||
Exclude PS5: 1 |
|
||||
Exclude WebGL: 1 |
|
||||
Exclude Win: 1 |
|
||||
Exclude Win64: 1 |
|
||||
- first: |
|
||||
Any: |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: {} |
|
||||
- first: |
|
||||
Editor: Editor |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: |
|
||||
DefaultValueInitialized: true |
|
||||
- first: |
|
||||
Standalone: Linux64 |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: |
|
||||
CPU: None |
|
||||
- first: |
|
||||
Standalone: Win |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: |
|
||||
CPU: None |
|
||||
- first: |
|
||||
Standalone: Win64 |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: |
|
||||
CPU: None |
|
||||
userData: |
|
||||
assetBundleName: |
|
||||
assetBundleVariant: |
|
||||
@ -1,105 +0,0 @@ |
|||||
// This file is part of the FidelityFX SDK. |
|
||||
// |
|
||||
// Copyright (c) 2022-2023 Advanced Micro Devices, Inc. All rights reserved. |
|
||||
// |
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy |
|
||||
// of this software and associated documentation files (the "Software"), to deal |
|
||||
// in the Software without restriction, including without limitation the rights |
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
|
||||
// copies of the Software, and to permit persons to whom the Software is |
|
||||
// furnished to do so, subject to the following conditions: |
|
||||
// The above copyright notice and this permission notice shall be included in |
|
||||
// all copies or substantial portions of the Software. |
|
||||
// |
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
|
||||
// THE SOFTWARE. |
|
||||
|
|
||||
#ifndef FFX_FSR2_RESOURCES_H |
|
||||
#define FFX_FSR2_RESOURCES_H |
|
||||
|
|
||||
#if defined(FFX_CPU) || defined(FFX_GPU) |
|
||||
#define FFX_FSR2_RESOURCE_IDENTIFIER_NULL 0 |
|
||||
#define FFX_FSR2_RESOURCE_IDENTIFIER_INPUT_OPAQUE_ONLY 1 |
|
||||
#define FFX_FSR2_RESOURCE_IDENTIFIER_INPUT_COLOR 2 |
|
||||
#define FFX_FSR2_RESOURCE_IDENTIFIER_INPUT_MOTION_VECTORS 3 |
|
||||
#define FFX_FSR2_RESOURCE_IDENTIFIER_INPUT_DEPTH 4 |
|
||||
#define FFX_FSR2_RESOURCE_IDENTIFIER_INPUT_EXPOSURE 5 |
|
||||
#define FFX_FSR2_RESOURCE_IDENTIFIER_INPUT_REACTIVE_MASK 6 |
|
||||
#define FFX_FSR2_RESOURCE_IDENTIFIER_INPUT_TRANSPARENCY_AND_COMPOSITION_MASK 7 |
|
||||
#define FFX_FSR2_RESOURCE_IDENTIFIER_RECONSTRUCTED_PREVIOUS_NEAREST_DEPTH 8 |
|
||||
#define FFX_FSR2_RESOURCE_IDENTIFIER_DILATED_MOTION_VECTORS 9 |
|
||||
#define FFX_FSR2_RESOURCE_IDENTIFIER_DILATED_DEPTH 10 |
|
||||
#define FFX_FSR2_RESOURCE_IDENTIFIER_INTERNAL_UPSCALED_COLOR 11 |
|
||||
#define FFX_FSR2_RESOURCE_IDENTIFIER_LOCK_STATUS 12 |
|
||||
#define FFX_FSR2_RESOURCE_IDENTIFIER_NEW_LOCKS 13 |
|
||||
#define FFX_FSR2_RESOURCE_IDENTIFIER_PREPARED_INPUT_COLOR 14 |
|
||||
#define FFX_FSR2_RESOURCE_IDENTIFIER_LUMA_HISTORY 15 |
|
||||
#define FFX_FSR2_RESOURCE_IDENTIFIER_DEBUG_OUTPUT 16 |
|
||||
#define FFX_FSR2_RESOURCE_IDENTIFIER_LANCZOS_LUT 17 |
|
||||
#define FFX_FSR2_RESOURCE_IDENTIFIER_SPD_ATOMIC_COUNT 18 |
|
||||
#define FFX_FSR2_RESOURCE_IDENTIFIER_UPSCALED_OUTPUT 19 |
|
||||
#define FFX_FSR2_RESOURCE_IDENTIFIER_RCAS_INPUT 20 |
|
||||
#define FFX_FSR2_RESOURCE_IDENTIFIER_LOCK_STATUS_1 21 |
|
||||
#define FFX_FSR2_RESOURCE_IDENTIFIER_LOCK_STATUS_2 22 |
|
||||
#define FFX_FSR2_RESOURCE_IDENTIFIER_INTERNAL_UPSCALED_COLOR_1 23 |
|
||||
#define FFX_FSR2_RESOURCE_IDENTIFIER_INTERNAL_UPSCALED_COLOR_2 24 |
|
||||
#define FFX_FSR2_RESOURCE_IDENTIFIER_INTERNAL_DEFAULT_REACTIVITY 25 |
|
||||
#define FFX_FSR2_RESOURCE_IDENTIFIER_INTERNAL_DEFAULT_TRANSPARENCY_AND_COMPOSITION 26 |
|
||||
#define FFX_FSR2_RESOURCE_IDENTITIER_UPSAMPLE_MAXIMUM_BIAS_LUT 27 |
|
||||
#define FFX_FSR2_RESOURCE_IDENTIFIER_DILATED_REACTIVE_MASKS 28 |
|
||||
#define FFX_FSR2_RESOURCE_IDENTIFIER_SCENE_LUMINANCE 29 // same as FFX_FSR2_RESOURCE_IDENTIFIER_SCENE_LUMINANCE_MIPMAP_0 |
|
||||
#define FFX_FSR2_RESOURCE_IDENTIFIER_SCENE_LUMINANCE_MIPMAP_0 29 |
|
||||
#define FFX_FSR2_RESOURCE_IDENTIFIER_SCENE_LUMINANCE_MIPMAP_1 30 |
|
||||
#define FFX_FSR2_RESOURCE_IDENTIFIER_SCENE_LUMINANCE_MIPMAP_2 31 |
|
||||
#define FFX_FSR2_RESOURCE_IDENTIFIER_SCENE_LUMINANCE_MIPMAP_3 32 |
|
||||
#define FFX_FSR2_RESOURCE_IDENTIFIER_SCENE_LUMINANCE_MIPMAP_4 33 |
|
||||
#define FFX_FSR2_RESOURCE_IDENTIFIER_SCENE_LUMINANCE_MIPMAP_5 34 |
|
||||
#define FFX_FSR2_RESOURCE_IDENTIFIER_SCENE_LUMINANCE_MIPMAP_6 35 |
|
||||
#define FFX_FSR2_RESOURCE_IDENTIFIER_SCENE_LUMINANCE_MIPMAP_7 36 |
|
||||
#define FFX_FSR2_RESOURCE_IDENTIFIER_SCENE_LUMINANCE_MIPMAP_8 37 |
|
||||
#define FFX_FSR2_RESOURCE_IDENTIFIER_SCENE_LUMINANCE_MIPMAP_9 38 |
|
||||
#define FFX_FSR2_RESOURCE_IDENTIFIER_SCENE_LUMINANCE_MIPMAP_10 39 |
|
||||
#define FFX_FSR2_RESOURCE_IDENTIFIER_SCENE_LUMINANCE_MIPMAP_11 40 |
|
||||
#define FFX_FSR2_RESOURCE_IDENTIFIER_SCENE_LUMINANCE_MIPMAP_12 41 |
|
||||
#define FFX_FSR2_RESOURCE_IDENTIFIER_INTERNAL_DEFAULT_EXPOSURE 42 |
|
||||
#define FFX_FSR2_RESOURCE_IDENTIFIER_AUTO_EXPOSURE 43 |
|
||||
#define FFX_FSR2_RESOURCE_IDENTIFIER_AUTOREACTIVE 44 |
|
||||
#define FFX_FSR2_RESOURCE_IDENTIFIER_AUTOCOMPOSITION 45 |
|
||||
|
|
||||
#define FFX_FSR2_RESOURCE_IDENTIFIER_PREV_PRE_ALPHA_COLOR 46 |
|
||||
#define FFX_FSR2_RESOURCE_IDENTIFIER_PREV_POST_ALPHA_COLOR 47 |
|
||||
#define FFX_FSR2_RESOURCE_IDENTIFIER_PREV_PRE_ALPHA_COLOR_1 48 |
|
||||
#define FFX_FSR2_RESOURCE_IDENTIFIER_PREV_POST_ALPHA_COLOR_1 49 |
|
||||
#define FFX_FSR2_RESOURCE_IDENTIFIER_PREV_PRE_ALPHA_COLOR_2 50 |
|
||||
#define FFX_FSR2_RESOURCE_IDENTIFIER_PREV_POST_ALPHA_COLOR_2 51 |
|
||||
#define FFX_FSR2_RESOURCE_IDENTIFIER_PREVIOUS_DILATED_MOTION_VECTORS 52 |
|
||||
#define FFX_FSR2_RESOURCE_IDENTIFIER_INTERNAL_DILATED_MOTION_VECTORS_1 53 |
|
||||
#define FFX_FSR2_RESOURCE_IDENTIFIER_INTERNAL_DILATED_MOTION_VECTORS_2 54 |
|
||||
#define FFX_FSR2_RESOURCE_IDENTIFIER_LUMA_HISTORY_1 55 |
|
||||
#define FFX_FSR2_RESOURCE_IDENTIFIER_LUMA_HISTORY_2 56 |
|
||||
#define FFX_FSR2_RESOURCE_IDENTIFIER_LOCK_INPUT_LUMA 57 |
|
||||
|
|
||||
// Shading change detection mip level setting, value must be in the range [FFX_FSR2_RESOURCE_IDENTIFIER_SCENE_LUMINANCE_MIPMAP_0, FFX_FSR2_RESOURCE_IDENTIFIER_SCENE_LUMINANCE_MIPMAP_12] |
|
||||
#define FFX_FSR2_RESOURCE_IDENTIFIER_SCENE_LUMINANCE_MIPMAP_SHADING_CHANGE FFX_FSR2_RESOURCE_IDENTIFIER_SCENE_LUMINANCE_MIPMAP_4 |
|
||||
#define FFX_FSR2_SHADING_CHANGE_MIP_LEVEL (FFX_FSR2_RESOURCE_IDENTIFIER_SCENE_LUMINANCE_MIPMAP_SHADING_CHANGE - FFX_FSR2_RESOURCE_IDENTIFIER_SCENE_LUMINANCE) |
|
||||
|
|
||||
#define FFX_FSR2_RESOURCE_IDENTIFIER_COUNT 58 |
|
||||
|
|
||||
#define FFX_FSR2_CONSTANTBUFFER_IDENTIFIER_FSR2 0 |
|
||||
#define FFX_FSR2_CONSTANTBUFFER_IDENTIFIER_SPD 1 |
|
||||
#define FFX_FSR2_CONSTANTBUFFER_IDENTIFIER_RCAS 2 |
|
||||
#define FFX_FSR2_CONSTANTBUFFER_IDENTIFIER_GENREACTIVE 3 |
|
||||
|
|
||||
#define FFX_FSR2_AUTOREACTIVEFLAGS_APPLY_TONEMAP 1 |
|
||||
#define FFX_FSR2_AUTOREACTIVEFLAGS_APPLY_INVERSETONEMAP 2 |
|
||||
#define FFX_FSR2_AUTOREACTIVEFLAGS_APPLY_THRESHOLD 4 |
|
||||
#define FFX_FSR2_AUTOREACTIVEFLAGS_USE_COMPONENTS_MAX 8 |
|
||||
|
|
||||
#endif // #if defined(FFX_CPU) || defined(FFX_GPU) |
|
||||
|
|
||||
#endif //!defined( FFX_FSR2_RESOURCES_H ) |
|
||||
@ -1,60 +0,0 @@ |
|||||
fileFormatVersion: 2 |
|
||||
guid: fd5bed2bf4ba07444ae815390168a15d |
|
||||
PluginImporter: |
|
||||
externalObjects: {} |
|
||||
serializedVersion: 2 |
|
||||
iconMap: {} |
|
||||
executionOrder: {} |
|
||||
defineConstraints: [] |
|
||||
isPreloaded: 0 |
|
||||
isOverridable: 0 |
|
||||
isExplicitlyReferenced: 0 |
|
||||
validateReferences: 1 |
|
||||
platformData: |
|
||||
- first: |
|
||||
: Any |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: |
|
||||
Exclude Editor: 1 |
|
||||
Exclude GameCoreScarlett: 1 |
|
||||
Exclude GameCoreXboxOne: 1 |
|
||||
Exclude Linux64: 1 |
|
||||
Exclude OSXUniversal: 1 |
|
||||
Exclude PS4: 1 |
|
||||
Exclude PS5: 1 |
|
||||
Exclude WebGL: 1 |
|
||||
Exclude Win: 1 |
|
||||
Exclude Win64: 1 |
|
||||
- first: |
|
||||
Any: |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: {} |
|
||||
- first: |
|
||||
Editor: Editor |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: |
|
||||
DefaultValueInitialized: true |
|
||||
- first: |
|
||||
Standalone: Linux64 |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: |
|
||||
CPU: None |
|
||||
- first: |
|
||||
Standalone: Win |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: |
|
||||
CPU: None |
|
||||
- first: |
|
||||
Standalone: Win64 |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: |
|
||||
CPU: None |
|
||||
userData: |
|
||||
assetBundleName: |
|
||||
assetBundleVariant: |
|
||||
@ -1,60 +0,0 @@ |
|||||
fileFormatVersion: 2 |
|
||||
guid: ba3ee190167b6c240aaeb1f8f4dbcb67 |
|
||||
PluginImporter: |
|
||||
externalObjects: {} |
|
||||
serializedVersion: 2 |
|
||||
iconMap: {} |
|
||||
executionOrder: {} |
|
||||
defineConstraints: [] |
|
||||
isPreloaded: 0 |
|
||||
isOverridable: 0 |
|
||||
isExplicitlyReferenced: 0 |
|
||||
validateReferences: 1 |
|
||||
platformData: |
|
||||
- first: |
|
||||
: Any |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: |
|
||||
Exclude Editor: 1 |
|
||||
Exclude GameCoreScarlett: 1 |
|
||||
Exclude GameCoreXboxOne: 1 |
|
||||
Exclude Linux64: 1 |
|
||||
Exclude OSXUniversal: 1 |
|
||||
Exclude PS4: 1 |
|
||||
Exclude PS5: 1 |
|
||||
Exclude WebGL: 1 |
|
||||
Exclude Win: 1 |
|
||||
Exclude Win64: 1 |
|
||||
- first: |
|
||||
Any: |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: {} |
|
||||
- first: |
|
||||
Editor: Editor |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: |
|
||||
DefaultValueInitialized: true |
|
||||
- first: |
|
||||
Standalone: Linux64 |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: |
|
||||
CPU: None |
|
||||
- first: |
|
||||
Standalone: Win |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: |
|
||||
CPU: None |
|
||||
- first: |
|
||||
Standalone: Win64 |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: |
|
||||
CPU: None |
|
||||
userData: |
|
||||
assetBundleName: |
|
||||
assetBundleVariant: |
|
||||
@ -1,60 +0,0 @@ |
|||||
fileFormatVersion: 2 |
|
||||
guid: 18b8590c99b171a4e9af68dfd2c3ff02 |
|
||||
PluginImporter: |
|
||||
externalObjects: {} |
|
||||
serializedVersion: 2 |
|
||||
iconMap: {} |
|
||||
executionOrder: {} |
|
||||
defineConstraints: [] |
|
||||
isPreloaded: 0 |
|
||||
isOverridable: 0 |
|
||||
isExplicitlyReferenced: 0 |
|
||||
validateReferences: 1 |
|
||||
platformData: |
|
||||
- first: |
|
||||
: Any |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: |
|
||||
Exclude Editor: 1 |
|
||||
Exclude GameCoreScarlett: 1 |
|
||||
Exclude GameCoreXboxOne: 1 |
|
||||
Exclude Linux64: 1 |
|
||||
Exclude OSXUniversal: 1 |
|
||||
Exclude PS4: 1 |
|
||||
Exclude PS5: 1 |
|
||||
Exclude WebGL: 1 |
|
||||
Exclude Win: 1 |
|
||||
Exclude Win64: 1 |
|
||||
- first: |
|
||||
Any: |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: {} |
|
||||
- first: |
|
||||
Editor: Editor |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: |
|
||||
DefaultValueInitialized: true |
|
||||
- first: |
|
||||
Standalone: Linux64 |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: |
|
||||
CPU: None |
|
||||
- first: |
|
||||
Standalone: Win |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: |
|
||||
CPU: None |
|
||||
- first: |
|
||||
Standalone: Win64 |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: |
|
||||
CPU: None |
|
||||
userData: |
|
||||
assetBundleName: |
|
||||
assetBundleVariant: |
|
||||
@ -1,7 +0,0 @@ |
|||||
fileFormatVersion: 2 |
|
||||
guid: 9feb1fa4d6cff5a4799298dc69b12a8e |
|
||||
ShaderIncludeImporter: |
|
||||
externalObjects: {} |
|
||||
userData: |
|
||||
assetBundleName: |
|
||||
assetBundleVariant: |
|
||||
@ -1,60 +0,0 @@ |
|||||
fileFormatVersion: 2 |
|
||||
guid: 1ff3a385cfe07db4387e4d7b457238f8 |
|
||||
PluginImporter: |
|
||||
externalObjects: {} |
|
||||
serializedVersion: 2 |
|
||||
iconMap: {} |
|
||||
executionOrder: {} |
|
||||
defineConstraints: [] |
|
||||
isPreloaded: 0 |
|
||||
isOverridable: 0 |
|
||||
isExplicitlyReferenced: 0 |
|
||||
validateReferences: 1 |
|
||||
platformData: |
|
||||
- first: |
|
||||
: Any |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: |
|
||||
Exclude Editor: 1 |
|
||||
Exclude GameCoreScarlett: 1 |
|
||||
Exclude GameCoreXboxOne: 1 |
|
||||
Exclude Linux64: 1 |
|
||||
Exclude OSXUniversal: 1 |
|
||||
Exclude PS4: 1 |
|
||||
Exclude PS5: 1 |
|
||||
Exclude WebGL: 1 |
|
||||
Exclude Win: 1 |
|
||||
Exclude Win64: 1 |
|
||||
- first: |
|
||||
Any: |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: {} |
|
||||
- first: |
|
||||
Editor: Editor |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: |
|
||||
DefaultValueInitialized: true |
|
||||
- first: |
|
||||
Standalone: Linux64 |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: |
|
||||
CPU: None |
|
||||
- first: |
|
||||
Standalone: Win |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: |
|
||||
CPU: None |
|
||||
- first: |
|
||||
Standalone: Win64 |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: |
|
||||
CPU: None |
|
||||
userData: |
|
||||
assetBundleName: |
|
||||
assetBundleVariant: |
|
||||
@ -1,60 +0,0 @@ |
|||||
fileFormatVersion: 2 |
|
||||
guid: 3ef69a900a925bb498651c10581e0979 |
|
||||
PluginImporter: |
|
||||
externalObjects: {} |
|
||||
serializedVersion: 2 |
|
||||
iconMap: {} |
|
||||
executionOrder: {} |
|
||||
defineConstraints: [] |
|
||||
isPreloaded: 0 |
|
||||
isOverridable: 0 |
|
||||
isExplicitlyReferenced: 0 |
|
||||
validateReferences: 1 |
|
||||
platformData: |
|
||||
- first: |
|
||||
: Any |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: |
|
||||
Exclude Editor: 1 |
|
||||
Exclude GameCoreScarlett: 1 |
|
||||
Exclude GameCoreXboxOne: 1 |
|
||||
Exclude Linux64: 1 |
|
||||
Exclude OSXUniversal: 1 |
|
||||
Exclude PS4: 1 |
|
||||
Exclude PS5: 1 |
|
||||
Exclude WebGL: 1 |
|
||||
Exclude Win: 1 |
|
||||
Exclude Win64: 1 |
|
||||
- first: |
|
||||
Any: |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: {} |
|
||||
- first: |
|
||||
Editor: Editor |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: |
|
||||
DefaultValueInitialized: true |
|
||||
- first: |
|
||||
Standalone: Linux64 |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: |
|
||||
CPU: None |
|
||||
- first: |
|
||||
Standalone: Win |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: |
|
||||
CPU: None |
|
||||
- first: |
|
||||
Standalone: Win64 |
|
||||
second: |
|
||||
enabled: 0 |
|
||||
settings: |
|
||||
CPU: None |
|
||||
userData: |
|
||||
assetBundleName: |
|
||||
assetBundleVariant: |
|
||||
@ -0,0 +1,151 @@ |
|||||
|
// Copyright (c) 2023 Nico de Poel
|
||||
|
//
|
||||
|
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
|
// of this software and associated documentation files (the "Software"), to deal
|
||||
|
// in the Software without restriction, including without limitation the rights
|
||||
|
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
|
// copies of the Software, and to permit persons to whom the Software is
|
||||
|
// furnished to do so, subject to the following conditions:
|
||||
|
//
|
||||
|
// The above copyright notice and this permission notice shall be included in all
|
||||
|
// copies or substantial portions of the Software.
|
||||
|
//
|
||||
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
|
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
|
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
|
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
|
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
|
// THE SOFTWARE.
|
||||
|
|
||||
|
using UnityEngine; |
||||
|
|
||||
|
namespace FidelityFX |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// Scriptable object containing all shader resources required by FidelityFX Super Resolution 3 (FSR3) Upscaler.
|
||||
|
/// These can be stored in an asset file and referenced from a scene or prefab, avoiding the need to load the shaders from a Resources folder.
|
||||
|
/// </summary>
|
||||
|
public class Fsr3UpscalerAssets : ScriptableObject |
||||
|
{ |
||||
|
public Fsr3UpscalerShaders shaders; |
||||
|
|
||||
|
#if UNITY_EDITOR
|
||||
|
private void Reset() |
||||
|
{ |
||||
|
shaders = new Fsr3UpscalerShaders |
||||
|
{ |
||||
|
computeLuminancePyramidPass = FindComputeShader("ffx_fsr3upscaler_compute_luminance_pyramid_pass"), |
||||
|
reconstructPreviousDepthPass = FindComputeShader("ffx_fsr3upscaler_reconstruct_previous_depth_pass"), |
||||
|
depthClipPass = FindComputeShader("ffx_fsr3upscaler_depth_clip_pass"), |
||||
|
lockPass = FindComputeShader("ffx_fsr3upscaler_lock_pass"), |
||||
|
accumulatePass = FindComputeShader("ffx_fsr3upscaler_accumulate_pass"), |
||||
|
sharpenPass = FindComputeShader("ffx_fsr3upscaler_rcas_pass"), |
||||
|
autoGenReactivePass = FindComputeShader("ffx_fsr3upscaler_autogen_reactive_pass"), |
||||
|
tcrAutoGenPass = FindComputeShader("ffx_fsr3upscaler_tcr_autogen_pass"), |
||||
|
}; |
||||
|
} |
||||
|
|
||||
|
private static ComputeShader FindComputeShader(string name) |
||||
|
{ |
||||
|
string[] assetGuids = UnityEditor.AssetDatabase.FindAssets($"t:ComputeShader {name}"); |
||||
|
if (assetGuids == null || assetGuids.Length == 0) |
||||
|
return null; |
||||
|
|
||||
|
string assetPath = UnityEditor.AssetDatabase.GUIDToAssetPath(assetGuids[0]); |
||||
|
return UnityEditor.AssetDatabase.LoadAssetAtPath<ComputeShader>(assetPath); |
||||
|
} |
||||
|
#endif
|
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// All the compute shaders used by the FSR3 Upscaler.
|
||||
|
/// </summary>
|
||||
|
[System.Serializable] |
||||
|
public class Fsr3UpscalerShaders |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// The compute shader used by the luminance pyramid computation pass.
|
||||
|
/// </summary>
|
||||
|
public ComputeShader computeLuminancePyramidPass; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// The compute shader used by the previous depth reconstruction pass.
|
||||
|
/// </summary>
|
||||
|
public ComputeShader reconstructPreviousDepthPass; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// The compute shader used by the depth clip pass.
|
||||
|
/// </summary>
|
||||
|
public ComputeShader depthClipPass; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// The compute shader used by the lock pass.
|
||||
|
/// </summary>
|
||||
|
public ComputeShader lockPass; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// The compute shader used by the accumulation pass.
|
||||
|
/// </summary>
|
||||
|
public ComputeShader accumulatePass; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// The compute shader used by the RCAS sharpening pass.
|
||||
|
/// </summary>
|
||||
|
public ComputeShader sharpenPass; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// The compute shader used to auto-generate a reactive mask.
|
||||
|
/// </summary>
|
||||
|
public ComputeShader autoGenReactivePass; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// The compute shader used to auto-generate a transparency & composition mask.
|
||||
|
/// </summary>
|
||||
|
public ComputeShader tcrAutoGenPass; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// Returns a copy of this class and its contents.
|
||||
|
/// </summary>
|
||||
|
public Fsr3UpscalerShaders Clone() |
||||
|
{ |
||||
|
return (Fsr3UpscalerShaders)MemberwiseClone(); |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// Returns a copy of this class with clones of all its shaders.
|
||||
|
/// This can be useful if you're running multiple FSR3 Upscaler instances with different shader configurations.
|
||||
|
/// Be sure to clean up these clones through Dispose once you're done with them.
|
||||
|
/// </summary>
|
||||
|
public Fsr3UpscalerShaders DeepCopy() |
||||
|
{ |
||||
|
return new Fsr3UpscalerShaders |
||||
|
{ |
||||
|
computeLuminancePyramidPass = Object.Instantiate(computeLuminancePyramidPass), |
||||
|
reconstructPreviousDepthPass = Object.Instantiate(reconstructPreviousDepthPass), |
||||
|
depthClipPass = Object.Instantiate(depthClipPass), |
||||
|
lockPass = Object.Instantiate(lockPass), |
||||
|
accumulatePass = Object.Instantiate(accumulatePass), |
||||
|
sharpenPass = Object.Instantiate(sharpenPass), |
||||
|
autoGenReactivePass = Object.Instantiate(autoGenReactivePass), |
||||
|
tcrAutoGenPass = Object.Instantiate(tcrAutoGenPass), |
||||
|
}; |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// Destroy all the shaders within this instance.
|
||||
|
/// Use this only on clones created through DeepCopy.
|
||||
|
/// </summary>
|
||||
|
public void Dispose() |
||||
|
{ |
||||
|
Object.Destroy(computeLuminancePyramidPass); |
||||
|
Object.Destroy(reconstructPreviousDepthPass); |
||||
|
Object.Destroy(depthClipPass); |
||||
|
Object.Destroy(lockPass); |
||||
|
Object.Destroy(accumulatePass); |
||||
|
Object.Destroy(sharpenPass); |
||||
|
Object.Destroy(autoGenReactivePass); |
||||
|
Object.Destroy(tcrAutoGenPass); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -1,5 +1,5 @@ |
|||||
fileFormatVersion: 2 |
fileFormatVersion: 2 |
||||
guid: 5906deeb6ec2854449bf33db2e71a046 |
|
||||
|
guid: db26e15a33db6ab42a38daab0ba2712f |
||||
MonoImporter: |
MonoImporter: |
||||
externalObjects: {} |
externalObjects: {} |
||||
serializedVersion: 2 |
serializedVersion: 2 |
||||
@ -1,5 +1,5 @@ |
|||||
fileFormatVersion: 2 |
fileFormatVersion: 2 |
||||
guid: cad7d53fa2166a0449bec7a9b4f17d69 |
|
||||
|
guid: 661ffc6dbd7389b4da99fb9f749745de |
||||
folderAsset: yes |
folderAsset: yes |
||||
DefaultImporter: |
DefaultImporter: |
||||
externalObjects: {} |
externalObjects: {} |
||||
@ -1,5 +1,5 @@ |
|||||
fileFormatVersion: 2 |
fileFormatVersion: 2 |
||||
guid: 0894ebeefb6aa7d4680c71dffbda3fee |
|
||||
|
guid: c9b45f0ae7673694ba57a4aadfe212e9 |
||||
ComputeShaderImporter: |
ComputeShaderImporter: |
||||
externalObjects: {} |
externalObjects: {} |
||||
preprocessorOverride: 0 |
preprocessorOverride: 0 |
||||
@ -0,0 +1,32 @@ |
|||||
|
// Copyright (c) 2023 Nico de Poel |
||||
|
// |
||||
|
// Permission is hereby granted, free of charge, to any person obtaining a copy |
||||
|
// of this software and associated documentation files (the "Software"), to deal |
||||
|
// in the Software without restriction, including without limitation the rights |
||||
|
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
||||
|
// copies of the Software, and to permit persons to whom the Software is |
||||
|
// furnished to do so, subject to the following conditions: |
||||
|
// |
||||
|
// The above copyright notice and this permission notice shall be included in all |
||||
|
// copies or substantial portions of the Software. |
||||
|
// |
||||
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
||||
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
||||
|
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
||||
|
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
||||
|
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
||||
|
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
||||
|
// THE SOFTWARE. |
||||
|
|
||||
|
#pragma kernel CS |
||||
|
|
||||
|
#pragma multi_compile_local __ FFX_HALF |
||||
|
#pragma multi_compile_local __ FFX_FSR3UPSCALER_OPTION_LOW_RESOLUTION_MOTION_VECTORS |
||||
|
#pragma multi_compile_local __ FFX_FSR3UPSCALER_OPTION_JITTERED_MOTION_VECTORS |
||||
|
#pragma multi_compile_local __ FFX_FSR3UPSCALER_OPTION_INVERTED_DEPTH |
||||
|
|
||||
|
#pragma multi_compile_local __ UNITY_FSR3UPSCALER_HDRP |
||||
|
|
||||
|
#include "ffx_fsr3upscaler_unity_common.cginc" |
||||
|
|
||||
|
#include "shaders/ffx_fsr3upscaler_autogen_reactive_pass.hlsl" |
||||
@ -1,5 +1,5 @@ |
|||||
fileFormatVersion: 2 |
fileFormatVersion: 2 |
||||
guid: 8026d9d8542eab6499c32d5d46beb2b6 |
|
||||
|
guid: 5716b91fdaa4e9e439df6b96a796fe6e |
||||
ComputeShaderImporter: |
ComputeShaderImporter: |
||||
externalObjects: {} |
externalObjects: {} |
||||
preprocessorOverride: 0 |
preprocessorOverride: 0 |
||||
@ -1,5 +1,5 @@ |
|||||
fileFormatVersion: 2 |
fileFormatVersion: 2 |
||||
guid: d18fb8811ca4753469c439784546104e |
|
||||
|
guid: d253be05abcdc80428503d3e4cce3a36 |
||||
ComputeShaderImporter: |
ComputeShaderImporter: |
||||
externalObjects: {} |
externalObjects: {} |
||||
preprocessorOverride: 0 |
preprocessorOverride: 0 |
||||
@ -1,5 +1,5 @@ |
|||||
fileFormatVersion: 2 |
fileFormatVersion: 2 |
||||
guid: 702560780e923c84394c9b22ba460a9c |
|
||||
|
guid: 20e44016ed34b0d4b8de499d1b566c69 |
||||
ComputeShaderImporter: |
ComputeShaderImporter: |
||||
externalObjects: {} |
externalObjects: {} |
||||
preprocessorOverride: 0 |
preprocessorOverride: 0 |
||||
@ -0,0 +1,8 @@ |
|||||
|
fileFormatVersion: 2 |
||||
|
guid: a135306e6d1857e43a86ef20db2a47fe |
||||
|
ComputeShaderImporter: |
||||
|
externalObjects: {} |
||||
|
preprocessorOverride: 0 |
||||
|
userData: |
||||
|
assetBundleName: |
||||
|
assetBundleVariant: |
||||
@ -0,0 +1,8 @@ |
|||||
|
fileFormatVersion: 2 |
||||
|
guid: 7aaf5cfff022de2499e9b0412f947f6c |
||||
|
ComputeShaderImporter: |
||||
|
externalObjects: {} |
||||
|
preprocessorOverride: 0 |
||||
|
userData: |
||||
|
assetBundleName: |
||||
|
assetBundleVariant: |
||||
@ -0,0 +1,8 @@ |
|||||
|
fileFormatVersion: 2 |
||||
|
guid: 4f59e5b9179d74844ae06a30ae1e0629 |
||||
|
ComputeShaderImporter: |
||||
|
externalObjects: {} |
||||
|
preprocessorOverride: 0 |
||||
|
userData: |
||||
|
assetBundleName: |
||||
|
assetBundleVariant: |
||||
@ -0,0 +1,8 @@ |
|||||
|
fileFormatVersion: 2 |
||||
|
guid: 75cdc6ef23f08ed498d4da511923fcea |
||||
|
ComputeShaderImporter: |
||||
|
externalObjects: {} |
||||
|
preprocessorOverride: 0 |
||||
|
userData: |
||||
|
assetBundleName: |
||||
|
assetBundleVariant: |
||||
@ -1,5 +1,5 @@ |
|||||
fileFormatVersion: 2 |
fileFormatVersion: 2 |
||||
guid: cc76bd6f46792f3418a56b79eb5c959b |
|
||||
|
guid: 3ce00ba677bb7e14bb91772fd68bfe6b |
||||
ShaderIncludeImporter: |
ShaderIncludeImporter: |
||||
externalObjects: {} |
externalObjects: {} |
||||
userData: |
userData: |
||||
@ -1,5 +1,5 @@ |
|||||
fileFormatVersion: 2 |
fileFormatVersion: 2 |
||||
guid: 4a24e63edc822264a871f58397325d51 |
|
||||
|
guid: 8364d4f86c613ec4d999d062f5f773b8 |
||||
folderAsset: yes |
folderAsset: yes |
||||
DefaultImporter: |
DefaultImporter: |
||||
externalObjects: {} |
externalObjects: {} |
||||
@ -0,0 +1,79 @@ |
|||||
|
// This file is part of the FidelityFX SDK. |
||||
|
// |
||||
|
// Copyright (c) 2023 Advanced Micro Devices, Inc. All rights reserved. |
||||
|
// |
||||
|
// Permission is hereby granted, free of charge, to any person obtaining a copy |
||||
|
// of this software and associated documentation files (the "Software"), to deal |
||||
|
// in the Software without restriction, including without limitation the rights |
||||
|
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
||||
|
// copies of the Software, and to permit persons to whom the Software is |
||||
|
// furnished to do so, subject to the following conditions: |
||||
|
// The above copyright notice and this permission notice shall be included in |
||||
|
// all copies or substantial portions of the Software. |
||||
|
// |
||||
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
||||
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
||||
|
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
||||
|
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
||||
|
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
||||
|
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
||||
|
// THE SOFTWARE. |
||||
|
|
||||
|
|
||||
|
#define FSR3UPSCALER_BIND_SRV_INPUT_EXPOSURE 0 |
||||
|
#define FSR3UPSCALER_BIND_SRV_DILATED_REACTIVE_MASKS 1 |
||||
|
#if FFX_FSR3UPSCALER_OPTION_LOW_RESOLUTION_MOTION_VECTORS |
||||
|
#define FSR3UPSCALER_BIND_SRV_DILATED_MOTION_VECTORS 2 |
||||
|
#else |
||||
|
#define FSR3UPSCALER_BIND_SRV_INPUT_MOTION_VECTORS 2 |
||||
|
#endif |
||||
|
#define FSR3UPSCALER_BIND_SRV_INTERNAL_UPSCALED 3 |
||||
|
#define FSR3UPSCALER_BIND_SRV_LOCK_STATUS 4 |
||||
|
#define FSR3UPSCALER_BIND_SRV_PREPARED_INPUT_COLOR 5 |
||||
|
#define FSR3UPSCALER_BIND_SRV_LANCZOS_LUT 6 |
||||
|
#define FSR3UPSCALER_BIND_SRV_UPSCALE_MAXIMUM_BIAS_LUT 7 |
||||
|
#define FSR3UPSCALER_BIND_SRV_SCENE_LUMINANCE_MIPS 8 |
||||
|
#define FSR3UPSCALER_BIND_SRV_AUTO_EXPOSURE 9 |
||||
|
#define FSR3UPSCALER_BIND_SRV_LUMA_HISTORY 10 |
||||
|
|
||||
|
#define FSR3UPSCALER_BIND_UAV_INTERNAL_UPSCALED 0 |
||||
|
#define FSR3UPSCALER_BIND_UAV_LOCK_STATUS 1 |
||||
|
#define FSR3UPSCALER_BIND_UAV_UPSCALED_OUTPUT 2 |
||||
|
#define FSR3UPSCALER_BIND_UAV_NEW_LOCKS 3 |
||||
|
#define FSR3UPSCALER_BIND_UAV_LUMA_HISTORY 4 |
||||
|
|
||||
|
#define FSR3UPSCALER_BIND_CB_FSR3UPSCALER 0 |
||||
|
|
||||
|
#include "fsr3upscaler/ffx_fsr3upscaler_callbacks_hlsl.h" |
||||
|
#include "fsr3upscaler/ffx_fsr3upscaler_common.h" |
||||
|
#include "fsr3upscaler/ffx_fsr3upscaler_sample.h" |
||||
|
#include "fsr3upscaler/ffx_fsr3upscaler_upsample.h" |
||||
|
#include "fsr3upscaler/ffx_fsr3upscaler_postprocess_lock_status.h" |
||||
|
#include "fsr3upscaler/ffx_fsr3upscaler_reproject.h" |
||||
|
#include "fsr3upscaler/ffx_fsr3upscaler_accumulate.h" |
||||
|
|
||||
|
#ifndef FFX_FSR3UPSCALER_THREAD_GROUP_WIDTH |
||||
|
#define FFX_FSR3UPSCALER_THREAD_GROUP_WIDTH 8 |
||||
|
#endif // #ifndef FFX_FSR3UPSCALER_THREAD_GROUP_WIDTH |
||||
|
#ifndef FFX_FSR3UPSCALER_THREAD_GROUP_HEIGHT |
||||
|
#define FFX_FSR3UPSCALER_THREAD_GROUP_HEIGHT 8 |
||||
|
#endif // FFX_FSR3UPSCALER_THREAD_GROUP_HEIGHT |
||||
|
#ifndef FFX_FSR3UPSCALER_THREAD_GROUP_DEPTH |
||||
|
#define FFX_FSR3UPSCALER_THREAD_GROUP_DEPTH 1 |
||||
|
#endif // #ifndef FFX_FSR3UPSCALER_THREAD_GROUP_DEPTH |
||||
|
#ifndef FFX_FSR3UPSCALER_NUM_THREADS |
||||
|
#define FFX_FSR3UPSCALER_NUM_THREADS [numthreads(FFX_FSR3UPSCALER_THREAD_GROUP_WIDTH, FFX_FSR3UPSCALER_THREAD_GROUP_HEIGHT, FFX_FSR3UPSCALER_THREAD_GROUP_DEPTH)] |
||||
|
#endif // #ifndef FFX_FSR3UPSCALER_NUM_THREADS |
||||
|
|
||||
|
FFX_PREFER_WAVE64 |
||||
|
FFX_FSR3UPSCALER_NUM_THREADS |
||||
|
FFX_FSR3UPSCALER_EMBED_ROOTSIG_CONTENT |
||||
|
void CS(uint2 uGroupId : SV_GroupID, uint2 uGroupThreadId : SV_GroupThreadID) |
||||
|
{ |
||||
|
const uint GroupRows = (uint(DisplaySize().y) + FFX_FSR3UPSCALER_THREAD_GROUP_HEIGHT - 1) / FFX_FSR3UPSCALER_THREAD_GROUP_HEIGHT; |
||||
|
uGroupId.y = GroupRows - uGroupId.y - 1; |
||||
|
|
||||
|
uint2 uDispatchThreadId = uGroupId * uint2(FFX_FSR3UPSCALER_THREAD_GROUP_WIDTH, FFX_FSR3UPSCALER_THREAD_GROUP_HEIGHT) + uGroupThreadId; |
||||
|
|
||||
|
Accumulate(uDispatchThreadId); |
||||
|
} |
||||
@ -1,5 +1,5 @@ |
|||||
fileFormatVersion: 2 |
fileFormatVersion: 2 |
||||
guid: 19dfb00afb70c3144b43ec2dc05ecdd9 |
|
||||
|
guid: 507ab779c38eddb429cdcedf9c108d1b |
||||
ShaderIncludeImporter: |
ShaderIncludeImporter: |
||||
externalObjects: {} |
externalObjects: {} |
||||
userData: |
userData: |
||||
@ -0,0 +1,77 @@ |
|||||
|
// This file is part of the FidelityFX SDK. |
||||
|
// |
||||
|
// Copyright (c) 2023 Advanced Micro Devices, Inc. All rights reserved. |
||||
|
// |
||||
|
// Permission is hereby granted, free of charge, to any person obtaining a copy |
||||
|
// of this software and associated documentation files (the "Software"), to deal |
||||
|
// in the Software without restriction, including without limitation the rights |
||||
|
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
||||
|
// copies of the Software, and to permit persons to whom the Software is |
||||
|
// furnished to do so, subject to the following conditions: |
||||
|
// The above copyright notice and this permission notice shall be included in |
||||
|
// all copies or substantial portions of the Software. |
||||
|
// |
||||
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
||||
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
||||
|
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
||||
|
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
||||
|
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
||||
|
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
||||
|
// THE SOFTWARE. |
||||
|
|
||||
|
|
||||
|
#define FSR3UPSCALER_BIND_SRV_INPUT_OPAQUE_ONLY 0 |
||||
|
#define FSR3UPSCALER_BIND_SRV_INPUT_COLOR 1 |
||||
|
|
||||
|
#define FSR3UPSCALER_BIND_UAV_AUTOREACTIVE 0 |
||||
|
|
||||
|
#define FSR3UPSCALER_BIND_CB_FSR3UPSCALER 0 |
||||
|
#define FSR3UPSCALER_BIND_CB_REACTIVE 1 |
||||
|
|
||||
|
#include "fsr3upscaler/ffx_fsr3upscaler_callbacks_hlsl.h" |
||||
|
#include "fsr3upscaler/ffx_fsr3upscaler_common.h" |
||||
|
|
||||
|
#ifndef FFX_FSR3UPSCALER_THREAD_GROUP_WIDTH |
||||
|
#define FFX_FSR3UPSCALER_THREAD_GROUP_WIDTH 8 |
||||
|
#endif // #ifndef FFX_FSR3UPSCALER_THREAD_GROUP_WIDTH |
||||
|
#ifndef FFX_FSR3UPSCALER_THREAD_GROUP_HEIGHT |
||||
|
#define FFX_FSR3UPSCALER_THREAD_GROUP_HEIGHT 8 |
||||
|
#endif // FFX_FSR3UPSCALER_THREAD_GROUP_HEIGHT |
||||
|
#ifndef FFX_FSR3UPSCALER_THREAD_GROUP_DEPTH |
||||
|
#define FFX_FSR3UPSCALER_THREAD_GROUP_DEPTH 1 |
||||
|
#endif // #ifndef FFX_FSR3UPSCALER_THREAD_GROUP_DEPTH |
||||
|
#ifndef FFX_FSR3UPSCALER_NUM_THREADS |
||||
|
#define FFX_FSR3UPSCALER_NUM_THREADS [numthreads(FFX_FSR3UPSCALER_THREAD_GROUP_WIDTH, FFX_FSR3UPSCALER_THREAD_GROUP_HEIGHT, FFX_FSR3UPSCALER_THREAD_GROUP_DEPTH)] |
||||
|
#endif // #ifndef FFX_FSR3UPSCALER_NUM_THREADS |
||||
|
|
||||
|
FFX_FSR3UPSCALER_NUM_THREADS |
||||
|
FFX_FSR3UPSCALER_EMBED_ROOTSIG_CONTENT |
||||
|
void CS(uint2 uGroupId : SV_GroupID, uint2 uGroupThreadId : SV_GroupThreadID) |
||||
|
{ |
||||
|
uint2 uDispatchThreadId = uGroupId * uint2(FFX_FSR3UPSCALER_THREAD_GROUP_WIDTH, FFX_FSR3UPSCALER_THREAD_GROUP_HEIGHT) + uGroupThreadId; |
||||
|
|
||||
|
float3 ColorPreAlpha = LoadOpaqueOnly( FFX_MIN16_I2(uDispatchThreadId) ).rgb; |
||||
|
float3 ColorPostAlpha = LoadInputColor(uDispatchThreadId).rgb; |
||||
|
|
||||
|
if (GenReactiveFlags() & FFX_FSR3UPSCALER_AUTOREACTIVEFLAGS_APPLY_TONEMAP) |
||||
|
{ |
||||
|
ColorPreAlpha = Tonemap(ColorPreAlpha); |
||||
|
ColorPostAlpha = Tonemap(ColorPostAlpha); |
||||
|
} |
||||
|
|
||||
|
if (GenReactiveFlags() & FFX_FSR3UPSCALER_AUTOREACTIVEFLAGS_APPLY_INVERSETONEMAP) |
||||
|
{ |
||||
|
ColorPreAlpha = InverseTonemap(ColorPreAlpha); |
||||
|
ColorPostAlpha = InverseTonemap(ColorPostAlpha); |
||||
|
} |
||||
|
|
||||
|
float out_reactive_value = 0.f; |
||||
|
float3 delta = abs(ColorPostAlpha - ColorPreAlpha); |
||||
|
|
||||
|
out_reactive_value = (GenReactiveFlags() & FFX_FSR3UPSCALER_AUTOREACTIVEFLAGS_USE_COMPONENTS_MAX) ? max(delta.x, max(delta.y, delta.z)) : length(delta); |
||||
|
out_reactive_value *= GenReactiveScale(); |
||||
|
|
||||
|
out_reactive_value = (GenReactiveFlags() & FFX_FSR3UPSCALER_AUTOREACTIVEFLAGS_APPLY_THRESHOLD) ? (out_reactive_value < GenReactiveThreshold() ? 0 : GenReactiveBinaryValue()) : out_reactive_value; |
||||
|
|
||||
|
rw_output_autoreactive[uDispatchThreadId] = out_reactive_value; |
||||
|
} |
||||
@ -1,5 +1,5 @@ |
|||||
fileFormatVersion: 2 |
fileFormatVersion: 2 |
||||
guid: 7981b48622ddaa944909ebf209284d83 |
|
||||
|
guid: 52cdb7a7c30cb614984908593ed19082 |
||||
ShaderIncludeImporter: |
ShaderIncludeImporter: |
||||
externalObjects: {} |
externalObjects: {} |
||||
userData: |
userData: |
||||
@ -0,0 +1,55 @@ |
|||||
|
// This file is part of the FidelityFX SDK. |
||||
|
// |
||||
|
// Copyright (c) 2023 Advanced Micro Devices, Inc. All rights reserved. |
||||
|
// |
||||
|
// Permission is hereby granted, free of charge, to any person obtaining a copy |
||||
|
// of this software and associated documentation files (the "Software"), to deal |
||||
|
// in the Software without restriction, including without limitation the rights |
||||
|
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
||||
|
// copies of the Software, and to permit persons to whom the Software is |
||||
|
// furnished to do so, subject to the following conditions: |
||||
|
// The above copyright notice and this permission notice shall be included in |
||||
|
// all copies or substantial portions of the Software. |
||||
|
// |
||||
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
||||
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
||||
|
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
||||
|
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
||||
|
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
||||
|
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
||||
|
// THE SOFTWARE. |
||||
|
|
||||
|
|
||||
|
#define FSR3UPSCALER_BIND_SRV_INPUT_COLOR 0 |
||||
|
|
||||
|
#define FSR3UPSCALER_BIND_UAV_SPD_GLOBAL_ATOMIC 0 |
||||
|
#define FSR3UPSCALER_BIND_UAV_EXPOSURE_MIP_LUMA_CHANGE 1 |
||||
|
#define FSR3UPSCALER_BIND_UAV_EXPOSURE_MIP_5 2 |
||||
|
#define FSR3UPSCALER_BIND_UAV_AUTO_EXPOSURE 3 |
||||
|
|
||||
|
#define FSR3UPSCALER_BIND_CB_FSR3UPSCALER 0 |
||||
|
#define FSR3UPSCALER_BIND_CB_SPD 1 |
||||
|
|
||||
|
#include "fsr3upscaler/ffx_fsr3upscaler_callbacks_hlsl.h" |
||||
|
#include "fsr3upscaler/ffx_fsr3upscaler_common.h" |
||||
|
#include "fsr3upscaler/ffx_fsr3upscaler_compute_luminance_pyramid.h" |
||||
|
|
||||
|
#ifndef FFX_FSR3UPSCALER_THREAD_GROUP_WIDTH |
||||
|
#define FFX_FSR3UPSCALER_THREAD_GROUP_WIDTH 256 |
||||
|
#endif // #ifndef FFX_FSR3UPSCALER_THREAD_GROUP_WIDTH |
||||
|
#ifndef FFX_FSR3UPSCALER_THREAD_GROUP_HEIGHT |
||||
|
#define FFX_FSR3UPSCALER_THREAD_GROUP_HEIGHT 1 |
||||
|
#endif // #ifndef FFX_FSR3UPSCALER_THREAD_GROUP_HEIGHT |
||||
|
#ifndef FFX_FSR3UPSCALER_THREAD_GROUP_DEPTH |
||||
|
#define FFX_FSR3UPSCALER_THREAD_GROUP_DEPTH 1 |
||||
|
#endif // #ifndef FFX_FSR3UPSCALER_THREAD_GROUP_DEPTH |
||||
|
#ifndef FFX_FSR3UPSCALER_NUM_THREADS |
||||
|
#define FFX_FSR3UPSCALER_NUM_THREADS [numthreads(FFX_FSR3UPSCALER_THREAD_GROUP_WIDTH, FFX_FSR3UPSCALER_THREAD_GROUP_HEIGHT, FFX_FSR3UPSCALER_THREAD_GROUP_DEPTH)] |
||||
|
#endif // #ifndef FFX_FSR3UPSCALER_NUM_THREADS |
||||
|
|
||||
|
FFX_FSR3UPSCALER_NUM_THREADS |
||||
|
FFX_FSR3UPSCALER_EMBED_CB2_ROOTSIG_CONTENT |
||||
|
void CS(uint3 WorkGroupId : SV_GroupID, uint LocalThreadIndex : SV_GroupIndex) |
||||
|
{ |
||||
|
ComputeAutoExposure(WorkGroupId, LocalThreadIndex); |
||||
|
} |
||||
@ -1,5 +1,5 @@ |
|||||
fileFormatVersion: 2 |
fileFormatVersion: 2 |
||||
guid: 356ec46d3f01672428b5a7a0de727548 |
|
||||
|
guid: 2d149b52ba0f5bb468a94a71dbbcb66f |
||||
ShaderIncludeImporter: |
ShaderIncludeImporter: |
||||
externalObjects: {} |
externalObjects: {} |
||||
userData: |
userData: |
||||
@ -0,0 +1,67 @@ |
|||||
|
// This file is part of the FidelityFX SDK. |
||||
|
// |
||||
|
// Copyright (c) 2023 Advanced Micro Devices, Inc. All rights reserved. |
||||
|
// |
||||
|
// Permission is hereby granted, free of charge, to any person obtaining a copy |
||||
|
// of this software and associated documentation files (the "Software"), to deal |
||||
|
// in the Software without restriction, including without limitation the rights |
||||
|
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
||||
|
// copies of the Software, and to permit persons to whom the Software is |
||||
|
// furnished to do so, subject to the following conditions: |
||||
|
// The above copyright notice and this permission notice shall be included in |
||||
|
// all copies or substantial portions of the Software. |
||||
|
// |
||||
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
||||
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
||||
|
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
||||
|
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
||||
|
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
||||
|
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
||||
|
// THE SOFTWARE. |
||||
|
|
||||
|
|
||||
|
#define FSR3UPSCALER_BIND_SRV_RECONSTRUCTED_PREV_NEAREST_DEPTH 0 |
||||
|
#define FSR3UPSCALER_BIND_SRV_DILATED_MOTION_VECTORS 1 |
||||
|
#define FSR3UPSCALER_BIND_SRV_DILATED_DEPTH 2 |
||||
|
#define FSR3UPSCALER_BIND_SRV_REACTIVE_MASK 3 |
||||
|
#define FSR3UPSCALER_BIND_SRV_TRANSPARENCY_AND_COMPOSITION_MASK 4 |
||||
|
#define FSR3UPSCALER_BIND_SRV_PREVIOUS_DILATED_MOTION_VECTORS 5 |
||||
|
#define FSR3UPSCALER_BIND_SRV_INPUT_MOTION_VECTORS 6 |
||||
|
#define FSR3UPSCALER_BIND_SRV_INPUT_COLOR 7 |
||||
|
#define FSR3UPSCALER_BIND_SRV_INPUT_DEPTH 8 |
||||
|
#define FSR3UPSCALER_BIND_SRV_INPUT_EXPOSURE 9 |
||||
|
|
||||
|
#define FSR3UPSCALER_BIND_UAV_DILATED_REACTIVE_MASKS 0 |
||||
|
#define FSR3UPSCALER_BIND_UAV_PREPARED_INPUT_COLOR 1 |
||||
|
|
||||
|
#define FSR3UPSCALER_BIND_CB_FSR3UPSCALER 0 |
||||
|
|
||||
|
#include "fsr3upscaler/ffx_fsr3upscaler_callbacks_hlsl.h" |
||||
|
#include "fsr3upscaler/ffx_fsr3upscaler_common.h" |
||||
|
#include "fsr3upscaler/ffx_fsr3upscaler_sample.h" |
||||
|
#include "fsr3upscaler/ffx_fsr3upscaler_depth_clip.h" |
||||
|
|
||||
|
#ifndef FFX_FSR3UPSCALER_THREAD_GROUP_WIDTH |
||||
|
#define FFX_FSR3UPSCALER_THREAD_GROUP_WIDTH 8 |
||||
|
#endif // #ifndef FFX_FSR3UPSCALER_THREAD_GROUP_WIDTH |
||||
|
#ifndef FFX_FSR3UPSCALER_THREAD_GROUP_HEIGHT |
||||
|
#define FFX_FSR3UPSCALER_THREAD_GROUP_HEIGHT 8 |
||||
|
#endif // #ifndef FFX_FSR3UPSCALER_THREAD_GROUP_HEIGHT |
||||
|
#ifndef FFX_FSR3UPSCALER_THREAD_GROUP_DEPTH |
||||
|
#define FFX_FSR3UPSCALER_THREAD_GROUP_DEPTH 1 |
||||
|
#endif // #ifndef FFX_FSR3UPSCALER_THREAD_GROUP_DEPTH |
||||
|
#ifndef FFX_FSR3UPSCALER_NUM_THREADS |
||||
|
#define FFX_FSR3UPSCALER_NUM_THREADS [numthreads(FFX_FSR3UPSCALER_THREAD_GROUP_WIDTH, FFX_FSR3UPSCALER_THREAD_GROUP_HEIGHT, FFX_FSR3UPSCALER_THREAD_GROUP_DEPTH)] |
||||
|
#endif // #ifndef FFX_FSR3UPSCALER_NUM_THREADS |
||||
|
|
||||
|
FFX_PREFER_WAVE64 |
||||
|
FFX_FSR3UPSCALER_NUM_THREADS |
||||
|
FFX_FSR3UPSCALER_EMBED_ROOTSIG_CONTENT |
||||
|
void CS( |
||||
|
int2 iGroupId : SV_GroupID, |
||||
|
int2 iDispatchThreadId : SV_DispatchThreadID, |
||||
|
int2 iGroupThreadId : SV_GroupThreadID, |
||||
|
int iGroupIndex : SV_GroupIndex) |
||||
|
{ |
||||
|
DepthClip(iDispatchThreadId); |
||||
|
} |
||||
@ -0,0 +1,7 @@ |
|||||
|
fileFormatVersion: 2 |
||||
|
guid: da435b71cf57e2247b80ae0f0f86d1f8 |
||||
|
ShaderIncludeImporter: |
||||
|
externalObjects: {} |
||||
|
userData: |
||||
|
assetBundleName: |
||||
|
assetBundleVariant: |
||||
@ -0,0 +1,56 @@ |
|||||
|
// This file is part of the FidelityFX SDK. |
||||
|
// |
||||
|
// Copyright (c) 2023 Advanced Micro Devices, Inc. All rights reserved. |
||||
|
// |
||||
|
// Permission is hereby granted, free of charge, to any person obtaining a copy |
||||
|
// of this software and associated documentation files (the "Software"), to deal |
||||
|
// in the Software without restriction, including without limitation the rights |
||||
|
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
||||
|
// copies of the Software, and to permit persons to whom the Software is |
||||
|
// furnished to do so, subject to the following conditions: |
||||
|
// The above copyright notice and this permission notice shall be included in |
||||
|
// all copies or substantial portions of the Software. |
||||
|
// |
||||
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
||||
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
||||
|
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
||||
|
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
||||
|
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
||||
|
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
||||
|
// THE SOFTWARE. |
||||
|
|
||||
|
|
||||
|
#define FSR3UPSCALER_BIND_SRV_LOCK_INPUT_LUMA 0 |
||||
|
|
||||
|
#define FSR3UPSCALER_BIND_UAV_NEW_LOCKS 0 |
||||
|
#define FSR3UPSCALER_BIND_UAV_RECONSTRUCTED_PREV_NEAREST_DEPTH 1 |
||||
|
|
||||
|
#define FSR3UPSCALER_BIND_CB_FSR3UPSCALER 0 |
||||
|
|
||||
|
#include "fsr3upscaler/ffx_fsr3upscaler_callbacks_hlsl.h" |
||||
|
#include "fsr3upscaler/ffx_fsr3upscaler_common.h" |
||||
|
#include "fsr3upscaler/ffx_fsr3upscaler_sample.h" |
||||
|
#include "fsr3upscaler/ffx_fsr3upscaler_lock.h" |
||||
|
|
||||
|
#ifndef FFX_FSR3UPSCALER_THREAD_GROUP_WIDTH |
||||
|
#define FFX_FSR3UPSCALER_THREAD_GROUP_WIDTH 8 |
||||
|
#endif // #ifndef FFX_FSR3UPSCALER_THREAD_GROUP_WIDTH |
||||
|
#ifndef FFX_FSR3UPSCALER_THREAD_GROUP_HEIGHT |
||||
|
#define FFX_FSR3UPSCALER_THREAD_GROUP_HEIGHT 8 |
||||
|
#endif // #ifndef FFX_FSR3UPSCALER_THREAD_GROUP_HEIGHT |
||||
|
#ifndef FFX_FSR3UPSCALER_THREAD_GROUP_DEPTH |
||||
|
#define FFX_FSR3UPSCALER_THREAD_GROUP_DEPTH 1 |
||||
|
#endif // #ifndef FFX_FSR3UPSCALER_THREAD_GROUP_DEPTH |
||||
|
#ifndef FFX_FSR3UPSCALER_NUM_THREADS |
||||
|
#define FFX_FSR3UPSCALER_NUM_THREADS [numthreads(FFX_FSR3UPSCALER_THREAD_GROUP_WIDTH, FFX_FSR3UPSCALER_THREAD_GROUP_HEIGHT, FFX_FSR3UPSCALER_THREAD_GROUP_DEPTH)] |
||||
|
#endif // #ifndef FFX_FSR3UPSCALER_NUM_THREADS |
||||
|
|
||||
|
FFX_PREFER_WAVE64 |
||||
|
FFX_FSR3UPSCALER_NUM_THREADS |
||||
|
FFX_FSR3UPSCALER_EMBED_ROOTSIG_CONTENT |
||||
|
void CS(uint2 uGroupId : SV_GroupID, uint2 uGroupThreadId : SV_GroupThreadID) |
||||
|
{ |
||||
|
uint2 uDispatchThreadId = uGroupId * uint2(FFX_FSR3UPSCALER_THREAD_GROUP_WIDTH, FFX_FSR3UPSCALER_THREAD_GROUP_HEIGHT) + uGroupThreadId; |
||||
|
|
||||
|
ComputeLock(uDispatchThreadId); |
||||
|
} |
||||
@ -0,0 +1,7 @@ |
|||||
|
fileFormatVersion: 2 |
||||
|
guid: 98d2cbbda5e90dd4ebd1d70abbb63a09 |
||||
|
ShaderIncludeImporter: |
||||
|
externalObjects: {} |
||||
|
userData: |
||||
|
assetBundleName: |
||||
|
assetBundleVariant: |
||||
@ -0,0 +1,53 @@ |
|||||
|
// This file is part of the FidelityFX SDK. |
||||
|
// |
||||
|
// Copyright (c) 2023 Advanced Micro Devices, Inc. All rights reserved. |
||||
|
// |
||||
|
// Permission is hereby granted, free of charge, to any person obtaining a copy |
||||
|
// of this software and associated documentation files (the "Software"), to deal |
||||
|
// in the Software without restriction, including without limitation the rights |
||||
|
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
||||
|
// copies of the Software, and to permit persons to whom the Software is |
||||
|
// furnished to do so, subject to the following conditions: |
||||
|
// The above copyright notice and this permission notice shall be included in |
||||
|
// all copies or substantial portions of the Software. |
||||
|
// |
||||
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
||||
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
||||
|
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
||||
|
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
||||
|
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
||||
|
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
||||
|
// THE SOFTWARE. |
||||
|
|
||||
|
|
||||
|
#define FSR3UPSCALER_BIND_SRV_INPUT_EXPOSURE 0 |
||||
|
#define FSR3UPSCALER_BIND_SRV_RCAS_INPUT 1 |
||||
|
|
||||
|
#define FSR3UPSCALER_BIND_UAV_UPSCALED_OUTPUT 0 |
||||
|
|
||||
|
#define FSR3UPSCALER_BIND_CB_FSR3UPSCALER 0 |
||||
|
#define FSR3UPSCALER_BIND_CB_RCAS 1 |
||||
|
|
||||
|
#include "fsr3upscaler/ffx_fsr3upscaler_callbacks_hlsl.h" |
||||
|
#include "fsr3upscaler/ffx_fsr3upscaler_common.h" |
||||
|
#include "fsr3upscaler/ffx_fsr3upscaler_rcas.h" |
||||
|
|
||||
|
#ifndef FFX_FSR3UPSCALER_THREAD_GROUP_WIDTH |
||||
|
#define FFX_FSR3UPSCALER_THREAD_GROUP_WIDTH 64 |
||||
|
#endif // #ifndef FFX_FSR3UPSCALER_THREAD_GROUP_WIDTH |
||||
|
#ifndef FFX_FSR3UPSCALER_THREAD_GROUP_HEIGHT |
||||
|
#define FFX_FSR3UPSCALER_THREAD_GROUP_HEIGHT 1 |
||||
|
#endif // #ifndef FFX_FSR3UPSCALER_THREAD_GROUP_HEIGHT |
||||
|
#ifndef FFX_FSR3UPSCALER_THREAD_GROUP_DEPTH |
||||
|
#define FFX_FSR3UPSCALER_THREAD_GROUP_DEPTH 1 |
||||
|
#endif // #ifndef FFX_FSR3UPSCALER_THREAD_GROUP_DEPTH |
||||
|
#ifndef FFX_FSR3UPSCALER_NUM_THREADS |
||||
|
#define FFX_FSR3UPSCALER_NUM_THREADS [numthreads(FFX_FSR3UPSCALER_THREAD_GROUP_WIDTH, FFX_FSR3UPSCALER_THREAD_GROUP_HEIGHT, FFX_FSR3UPSCALER_THREAD_GROUP_DEPTH)] |
||||
|
#endif // #ifndef FFX_FSR3UPSCALER_NUM_THREADS |
||||
|
|
||||
|
FFX_FSR3UPSCALER_NUM_THREADS |
||||
|
FFX_FSR3UPSCALER_EMBED_CB2_ROOTSIG_CONTENT |
||||
|
void CS(uint3 LocalThreadId : SV_GroupThreadID, uint3 WorkGroupId : SV_GroupID, uint3 Dtid : SV_DispatchThreadID) |
||||
|
{ |
||||
|
RCAS(LocalThreadId, WorkGroupId, Dtid); |
||||
|
} |
||||
@ -0,0 +1,7 @@ |
|||||
|
fileFormatVersion: 2 |
||||
|
guid: 9a15fc73170a9bc478801c8fa4d8d574 |
||||
|
ShaderIncludeImporter: |
||||
|
externalObjects: {} |
||||
|
userData: |
||||
|
assetBundleName: |
||||
|
assetBundleVariant: |
||||
@ -0,0 +1,64 @@ |
|||||
|
// This file is part of the FidelityFX SDK. |
||||
|
// |
||||
|
// Copyright (c) 2023 Advanced Micro Devices, Inc. All rights reserved. |
||||
|
// |
||||
|
// Permission is hereby granted, free of charge, to any person obtaining a copy |
||||
|
// of this software and associated documentation files (the "Software"), to deal |
||||
|
// in the Software without restriction, including without limitation the rights |
||||
|
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
||||
|
// copies of the Software, and to permit persons to whom the Software is |
||||
|
// furnished to do so, subject to the following conditions: |
||||
|
// The above copyright notice and this permission notice shall be included in |
||||
|
// all copies or substantial portions of the Software. |
||||
|
// |
||||
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
||||
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
||||
|
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
||||
|
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
||||
|
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
||||
|
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
||||
|
// THE SOFTWARE. |
||||
|
|
||||
|
|
||||
|
#define FSR3UPSCALER_BIND_SRV_INPUT_MOTION_VECTORS 0 |
||||
|
#define FSR3UPSCALER_BIND_SRV_INPUT_DEPTH 1 |
||||
|
#define FSR3UPSCALER_BIND_SRV_INPUT_COLOR 2 |
||||
|
#define FSR3UPSCALER_BIND_SRV_INPUT_EXPOSURE 3 |
||||
|
|
||||
|
#define FSR3UPSCALER_BIND_UAV_RECONSTRUCTED_PREV_NEAREST_DEPTH 0 |
||||
|
#define FSR3UPSCALER_BIND_UAV_DILATED_MOTION_VECTORS 1 |
||||
|
#define FSR3UPSCALER_BIND_UAV_DILATED_DEPTH 2 |
||||
|
#define FSR3UPSCALER_BIND_UAV_LOCK_INPUT_LUMA 3 |
||||
|
|
||||
|
#define FSR3UPSCALER_BIND_CB_FSR3UPSCALER 0 |
||||
|
|
||||
|
#include "fsr3upscaler/ffx_fsr3upscaler_callbacks_hlsl.h" |
||||
|
#include "fsr3upscaler/ffx_fsr3upscaler_common.h" |
||||
|
#include "fsr3upscaler/ffx_fsr3upscaler_sample.h" |
||||
|
#include "fsr3upscaler/ffx_fsr3upscaler_reconstruct_dilated_velocity_and_previous_depth.h" |
||||
|
|
||||
|
#ifndef FFX_FSR3UPSCALER_THREAD_GROUP_WIDTH |
||||
|
#define FFX_FSR3UPSCALER_THREAD_GROUP_WIDTH 8 |
||||
|
#endif // #ifndef FFX_FSR3UPSCALER_THREAD_GROUP_WIDTH |
||||
|
#ifndef FFX_FSR3UPSCALER_THREAD_GROUP_HEIGHT |
||||
|
#define FFX_FSR3UPSCALER_THREAD_GROUP_HEIGHT 8 |
||||
|
#endif // #ifndef FFX_FSR3UPSCALER_THREAD_GROUP_HEIGHT |
||||
|
#ifndef FFX_FSR3UPSCALER_THREAD_GROUP_DEPTH |
||||
|
#define FFX_FSR3UPSCALER_THREAD_GROUP_DEPTH 1 |
||||
|
#endif // #ifndef FFX_FSR3UPSCALER_THREAD_GROUP_DEPTH |
||||
|
#ifndef FFX_FSR3UPSCALER_NUM_THREADS |
||||
|
#define FFX_FSR3UPSCALER_NUM_THREADS [numthreads(FFX_FSR3UPSCALER_THREAD_GROUP_WIDTH, FFX_FSR3UPSCALER_THREAD_GROUP_HEIGHT, FFX_FSR3UPSCALER_THREAD_GROUP_DEPTH)] |
||||
|
#endif // #ifndef FFX_FSR3UPSCALER_NUM_THREADS |
||||
|
|
||||
|
FFX_PREFER_WAVE64 |
||||
|
FFX_FSR3UPSCALER_NUM_THREADS |
||||
|
FFX_FSR3UPSCALER_EMBED_ROOTSIG_CONTENT |
||||
|
void CS( |
||||
|
int2 iGroupId : SV_GroupID, |
||||
|
int2 iDispatchThreadId : SV_DispatchThreadID, |
||||
|
int2 iGroupThreadId : SV_GroupThreadID, |
||||
|
int iGroupIndex : SV_GroupIndex |
||||
|
) |
||||
|
{ |
||||
|
ReconstructAndDilate(iDispatchThreadId); |
||||
|
} |
||||
@ -0,0 +1,7 @@ |
|||||
|
fileFormatVersion: 2 |
||||
|
guid: bafb3726a76b97a49bb343d8a4323754 |
||||
|
ShaderIncludeImporter: |
||||
|
externalObjects: {} |
||||
|
userData: |
||||
|
assetBundleName: |
||||
|
assetBundleVariant: |
||||
@ -0,0 +1,7 @@ |
|||||
|
fileFormatVersion: 2 |
||||
|
guid: 712d171118b59fc4fb28d0d487060d42 |
||||
|
ShaderIncludeImporter: |
||||
|
externalObjects: {} |
||||
|
userData: |
||||
|
assetBundleName: |
||||
|
assetBundleVariant: |
||||
@ -1,5 +1,5 @@ |
|||||
fileFormatVersion: 2 |
fileFormatVersion: 2 |
||||
guid: 9e2d87f36f288024cb500a20acaae11e |
|
||||
|
guid: ae9c6d015ae76544f9e8117e79ea862b |
||||
folderAsset: yes |
folderAsset: yes |
||||
DefaultImporter: |
DefaultImporter: |
||||
externalObjects: {} |
externalObjects: {} |
||||
Some files were not shown because too many files changed in this diff
Write
Preview
Loading…
Cancel
Save
Reference in new issue