Skip to content
This repository was archived by the owner on Nov 30, 2020. It is now read-only.

Commit 76763ce

Browse files
committed
Fixed API selection in StdLib
1 parent 655a504 commit 76763ce

1 file changed

Lines changed: 11 additions & 11 deletions

File tree

PostProcessing/Shaders/StdLib.hlsl

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,19 @@
99
// -----------------------------------------------------------------------------
1010
// API macros
1111

12-
#if SHADER_API_PSSL
12+
#if defined(SHADER_API_PSSL)
1313
#include "API/PSSL.hlsl"
14-
#elif SHADER_API_XBOXONE
14+
#elif defined(SHADER_API_XBOXONE)
1515
#include "API/XboxOne.hlsl"
16-
#elif SHADER_API_D3D11
16+
#elif defined(SHADER_API_D3D11)
1717
#include "API/D3D11.hlsl"
18-
#elif SHADER_API_D3D12
18+
#elif defined(SHADER_API_D3D12)
1919
#include "API/D3D12.hlsl"
20-
#elif SHADER_API_D3D9 || SHADER_API_D3D11_9X
20+
#elif defined(SHADER_API_D3D9) || defined(SHADER_API_D3D11_9X)
2121
#include "API/D3D9.hlsl"
22-
#elif SHADER_API_VULKAN || SHADER_API_SWITCH
22+
#elif defined(SHADER_API_VULKAN) || defined(SHADER_API_SWITCH)
2323
#include "API/Vulkan.hlsl"
24-
#elif SHADER_API_METAL
24+
#elif defined(SHADER_API_METAL)
2525
#include "API/Metal.hlsl"
2626
#else
2727
#include "API/OpenGL.hlsl"
@@ -145,7 +145,7 @@ float4 PositivePow(float4 base, float4 power)
145145
// NaN checker
146146
bool IsNan(float x)
147147
{
148-
#if !SHADER_API_GLES
148+
#if !defined(SHADER_API_GLES)
149149
return isnan(x) || isinf(x);
150150
#else
151151
return (x <= 0.0 || 0.0 <= x) ? false : true;
@@ -154,7 +154,7 @@ bool IsNan(float x)
154154

155155
bool AnyIsNan(float2 x)
156156
{
157-
#if !SHADER_API_GLES
157+
#if !defined(SHADER_API_GLES)
158158
return any(isnan(x)) || any(isinf(x));
159159
#else
160160
return IsNan(x.x) || IsNan(x.y);
@@ -163,7 +163,7 @@ bool AnyIsNan(float2 x)
163163

164164
bool AnyIsNan(float3 x)
165165
{
166-
#if !SHADER_API_GLES
166+
#if !defined(SHADER_API_GLES)
167167
return any(isnan(x)) || any(isinf(x));
168168
#else
169169
return IsNan(x.x) || IsNan(x.y) || IsNan(x.z);
@@ -172,7 +172,7 @@ bool AnyIsNan(float3 x)
172172

173173
bool AnyIsNan(float4 x)
174174
{
175-
#if !SHADER_API_GLES
175+
#if !defined(SHADER_API_GLES)
176176
return any(isnan(x)) || any(isinf(x));
177177
#else
178178
return IsNan(x.x) || IsNan(x.y) || IsNan(x.z) || IsNan(x.w);

0 commit comments

Comments
 (0)