mirror of
https://github.com/overte-org/overte.git
synced 2025-04-25 22:36:39 +02:00
Try to fix the exp2 float version for linux
This commit is contained in:
parent
bdf2738f21
commit
bd4268ee18
1 changed files with 7 additions and 1 deletions
|
@ -1,10 +1,16 @@
|
||||||
// glsl / C++ compatible source as interface for FrustrumGrid
|
// 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) {
|
float frustumGrid_depthRampGridToVolume(float ngrid) {
|
||||||
//if (ngrid < 0.0f)
|
//if (ngrid < 0.0f)
|
||||||
// return ngrid;
|
// return ngrid;
|
||||||
// return ngrid;
|
// return ngrid;
|
||||||
// return sqrt(ngrid);
|
// return sqrt(ngrid);
|
||||||
return exp2(float(ngrid)) - 1.0f;
|
return float_exp2(ngrid) - 1.0f;
|
||||||
}
|
}
|
||||||
float frustumGrid_depthRampInverseVolumeToGrid(float nvolume) {
|
float frustumGrid_depthRampInverseVolumeToGrid(float nvolume) {
|
||||||
//if (nvolume < 0.0f)
|
//if (nvolume < 0.0f)
|
||||||
|
|
Loading…
Reference in a new issue