|
|
@ -8,12 +8,14 @@ |
|
|
#pragma multi_compile_local __ FFX_FSR2_OPTION_INVERTED_DEPTH |
|
|
#pragma multi_compile_local __ FFX_FSR2_OPTION_INVERTED_DEPTH |
|
|
#pragma multi_compile_local __ FFX_FSR2_OPTION_APPLY_SHARPENING |
|
|
#pragma multi_compile_local __ FFX_FSR2_OPTION_APPLY_SHARPENING |
|
|
|
|
|
|
|
|
#define FFX_GPU // Compiling for GPU |
|
|
|
|
|
#define FFX_HLSL // Compile for plain HLSL |
|
|
|
|
|
#define SPD_NO_WAVE_OPERATIONS // Wave operations require shader model 6.0; this works with #pragma use_dxc but only on D3D12 |
|
|
|
|
|
|
|
|
#include "ffx_fsr2_unity_common.h" |
|
|
|
|
|
|
|
|
#if SHADER_API_METAL |
|
|
|
|
|
#define InterlockedAdd(dest, val, orig) { (orig) = (dest); (dest) += (val); } |
|
|
|
|
|
|
|
|
// Wave operations require shader model 6.0; this can only be enabled when using DXC on D3D12 |
|
|
|
|
|
#if defined(UNITY_COMPILER_DXC) && defined(SHADER_API_D3D12) |
|
|
|
|
|
#pragma require WaveBasic // Required for WaveGetLaneIndex |
|
|
|
|
|
#pragma require WaveBallot // Required for WaveReadLaneAt |
|
|
|
|
|
#else |
|
|
|
|
|
#define SPD_NO_WAVE_OPERATIONS |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
#include "shaders/ffx_fsr2_compute_luminance_pyramid_pass.hlsl" |
|
|
#include "shaders/ffx_fsr2_compute_luminance_pyramid_pass.hlsl" |