From bd4268ee18d071b2a24adb5a99671d3e1873a2d3 Mon Sep 17 00:00:00 2001 From: sam Date: Sat, 1 Oct 2016 17:59:37 -0700 Subject: [PATCH] Try to fix the exp2 float version for linux --- libraries/render-utils/src/LightClusterGrid_shared.slh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/libraries/render-utils/src/LightClusterGrid_shared.slh b/libraries/render-utils/src/LightClusterGrid_shared.slh index 7308084b1e..285b80c229 100644 --- a/libraries/render-utils/src/LightClusterGrid_shared.slh +++ b/libraries/render-utils/src/LightClusterGrid_shared.slh @@ -1,10 +1,16 @@ // glsl / C++ compatible source as interface for FrustrumGrid +#if defined(Q_OS_LINUX) +#define float_exp2 exp2f +#else +#define float_exp2 exp2 +#endif + float frustumGrid_depthRampGridToVolume(float ngrid) { //if (ngrid < 0.0f) // return ngrid; // return ngrid; // return sqrt(ngrid); - return exp2(float(ngrid)) - 1.0f; + return float_exp2(ngrid) - 1.0f; } float frustumGrid_depthRampInverseVolumeToGrid(float nvolume) { //if (nvolume < 0.0f)