Skip to content

Commit fa395a1

Browse files
committed
- add atan2 to glsl and PI constant for all platforms
1 parent c52e7ad commit fa395a1

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

platform/glsl.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ precision highp sampler2DArray;
5050
#define mul( A, B ) ((A) * (B))
5151
#define mul_tbn( A, B ) ((B) * (A))
5252
#define saturate( A ) (clamp( A, 0.0, 1.0 ))
53+
#define atan2( A, B ) (atan(B, A))
5354
#define ddx dFdx
5455
#define ddy dFdy
5556
#define _pmfx_unroll

platform/pmfx.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#define chebyshev_normalize( V ) (V.xyz / max( max(abs(V.x), abs(V.y)), abs(V.z) ))
22
#define max3(v) max(max(v.x, v.y),v.z)
33
#define max4(v) max(max(max(v.x, v.y),v.z), v.w)
4+
#define PI 3.14159265358979323846264
45

56

0 commit comments

Comments
 (0)