|
|
@ -7,7 +7,7 @@ namespace FidelityFX |
|
|
/// All the compute shaders used by the FidelityFX Super Resolution 3 (FSR3) Upscaler.
|
|
|
/// All the compute shaders used by the FidelityFX Super Resolution 3 (FSR3) Upscaler.
|
|
|
/// </summary>
|
|
|
/// </summary>
|
|
|
[Serializable] |
|
|
[Serializable] |
|
|
public class Fsr3UpscalerShaders |
|
|
|
|
|
|
|
|
public class Fsr3UpscalerShaders: ScriptableObject |
|
|
{ |
|
|
{ |
|
|
/// <summary>
|
|
|
/// <summary>
|
|
|
/// The compute shader used by the luminance pyramid computation pass.
|
|
|
/// The compute shader used by the luminance pyramid computation pass.
|
|
|
@ -56,5 +56,29 @@ namespace FidelityFX |
|
|
{ |
|
|
{ |
|
|
return (Fsr3UpscalerShaders)MemberwiseClone(); |
|
|
return (Fsr3UpscalerShaders)MemberwiseClone(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
#if UNITY_EDITOR
|
|
|
|
|
|
private void Reset() |
|
|
|
|
|
{ |
|
|
|
|
|
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[] assets = UnityEditor.AssetDatabase.FindAssets($"t:ComputeShader {name}"); |
|
|
|
|
|
if (assets == null || assets.Length == 0) |
|
|
|
|
|
return null; |
|
|
|
|
|
|
|
|
|
|
|
string assetPath = UnityEditor.AssetDatabase.GUIDToAssetPath(assets[0]); |
|
|
|
|
|
return UnityEditor.AssetDatabase.LoadAssetAtPath<ComputeShader>(assetPath); |
|
|
|
|
|
} |
|
|
|
|
|
#endif
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |