Browse Source
Refactored loading of FSR3 compute shaders, using an aggregate object containing pre-loaded compute shaders instead of the old callbacks.
Refactored loading of FSR3 compute shaders, using an aggregate object containing pre-loaded compute shaders instead of the old callbacks.
This gives more control to the application about how shaders are loaded/unloaded, and it fits in much more nicely with PPV2's resources. Shaders are currently just serialized as part of the scene component, which isn't the optimal solution yet.fsr3
8 changed files with 114 additions and 87 deletions
-
10Assets/Scenes/SampleScene.unity
-
4Assets/Scripts/Core/Fsr3Upscaler.cs
-
13Assets/Scripts/Core/Fsr3UpscalerCallbacks.cs
-
8Assets/Scripts/Core/Fsr3UpscalerContext.cs
-
64Assets/Scripts/Core/Fsr3UpscalerPass.cs
-
60Assets/Scripts/Core/Fsr3UpscalerShaders.cs
-
11Assets/Scripts/Core/Fsr3UpscalerShaders.cs.meta
-
31Assets/Scripts/Fsr3UpscalerImageEffect.cs
@ -0,0 +1,60 @@ |
|||
using System; |
|||
using UnityEngine; |
|||
|
|||
namespace FidelityFX |
|||
{ |
|||
/// <summary>
|
|||
/// All the compute shaders used by the FidelityFX Super Resolution 3 (FSR3) Upscaler.
|
|||
/// </summary>
|
|||
[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(); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,11 @@ |
|||
fileFormatVersion: 2 |
|||
guid: db26e15a33db6ab42a38daab0ba2712f |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue