1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-10 13:00:37 +00:00

embree: cross compile fixes.

Fix typos in #if; add missing _MSC_VER; avoid warning in random generator.
This commit is contained in:
Lyuma
2021-01-18 06:20:24 -08:00
parent 0b3540a03c
commit 2c2f70c444
5 changed files with 33 additions and 11 deletions

View File

@@ -780,7 +780,8 @@ _ALWAYS_INLINE_ float uniform_rand() {
state ^= state << 13;
state ^= state >> 17;
state ^= state << 5;
return float(state) / UINT32_MAX;
/* implicit conversion from 'unsigned int' to 'float' changes value from 4294967295 to 4294967296 */
return float(state) / float(UINT32_MAX);
}
void LightmapperCPU::_compute_indirect_light(uint32_t p_idx, void *r_lightmap) {