Raylib: [models] Skybox not rendered on Intel HD GPU on Linux

Created on 21 Jan 2019  Â·  5Comments  Â·  Source: raysan5/raylib

Skybox sample (https://github.com/raysan5/raylib/blob/master/examples/models/models_skybox.c) show raw black texture instead of skybox on Linux laptops with integrated Intel GPUs.

Shaders are compiled successfully:

INFO: [SHDR ID 1] Shader compiled successfully
INFO: [SHDR ID 2] Shader compiled successfully
INFO: [SHDR ID 4] Shader compiled successfully
INFO: [SHDR ID 5] Shader compiled successfully
INFO: [SHDR ID 7] Shader compiled successfully
INFO: [SHDR ID 8] Shader compiled successfully

On laptops with two GPUs changing current adapter helps:
DRI_PRIME=0 ./models_skybox (Intel) — no skybox,
DRI_PRIME=1 ./models_skybox (AMD Radeon) — skybox is visible.
(Available adapters can be seen with xrandr --listproviders.)

NVidia and AMD adapters are probably not affected.

3D games using skybox (created with another toolkits, not Raylib), for example, Nexuiz, are working fine on the same GPU.

Most helpful comment

@yashrk This issue is most probably related to floating point textures support under Linux, already though about it when we spoke in Discord and this post seems to confirm my suspicions.

If you're wondering why skyboxes works with other engines, that's because they don't use floating point textures for them. I can implement that alternative... Actually, https://github.com/raysan5/raylib/issues/721 is related.

All 5 comments

@yashrk This issue is most probably related to floating point textures support under Linux, already though about it when we spoke in Discord and this post seems to confirm my suspicions.

If you're wondering why skyboxes works with other engines, that's because they don't use floating point textures for them. I can implement that alternative... Actually, https://github.com/raysan5/raylib/issues/721 is related.

Thank you! How can I test it? Should I change the code of skybox example to see skybox on Intel drivers?

Just updated and recompiled Raylib's master, the skybox is still totally black.

@yashrk not ready yet, just created some functions to allow custom cubemap generation but GenTextureCubemap() should be reimplemented to use new functions or implement a complete example using them.

I'm closing this issue for now, related functions have been partially reviewed (https://github.com/raysan5/raylib/issues/721) and this example will be also reviewed.

Was this page helpful?
0 / 5 - 0 ratings