You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
936 B
19 lines
936 B
#define FFX_GPU // Compiling for GPU
|
|
#define FFX_HLSL // Compile for plain HLSL
|
|
|
|
// Use the DXC shader compiler on modern graphics APIs to enable a few advanced features
|
|
#if defined(SHADER_API_D3D12) || defined(SHADER_API_VULKAN) || defined(SHADER_API_METAL)
|
|
//#pragma use_dxc // Using DXC will currently break DX11 support since DX11 and DX12 share the same shader bytecode in Unity. Disabling this by default... *sigh*
|
|
#endif
|
|
|
|
// Enable half precision data types on platforms that support it
|
|
#if defined(UNITY_COMPILER_DXC) && defined(FFX_HALF)
|
|
#pragma require Native16Bit
|
|
#endif
|
|
|
|
// Hack to work around the lack of texture atomics on Metal
|
|
#if defined(SHADER_API_METAL)
|
|
#define InterlockedAdd(dest, val, orig) { (orig) = (dest); (dest) += (val); }
|
|
#define InterlockedMin(dest, val) { (dest) = min((dest), (val)); }
|
|
#define InterlockedMax(dest, val) { (dest) = max((dest), (val)); }
|
|
#endif
|