Page 1 of 1

Shaders are broken with Irrlicht 1.8 + fglrx driver

PostPosted: Thu Jul 04, 2013 23:06
by MirceaKitsune
This issue took hours of frustrating debugging to understand, but now we know what the source is at least. Here is the problem:

I wanted to test RealBadAngel's bump mapping, when I noticed everything turns black once I enable it. Upon closer inspection, I discovered that shaders aren't working at all for me, and have been completely broken for months (although the option was enabled). Using debug_log_level = 3 I could see more information as to what happening, and obtained this log file. The lines of importance are:

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
00:09:49: INFO[main]: SourceShaderCache::getOrLoad(): No path found for "/opengl_vertex.glsl"
00:09:49: INFO[main]: SourceShaderCache::getOrLoad(): No path found for "/opengl_fragment.glsl"
00:09:49: INFO[main]: SourceShaderCache::getOrLoad(): No path found for "/opengl_geometry.glsl"
00:09:49: INFO[main]: SourceShaderCache::getOrLoad(): No path found for "/opengl_vertex.asm"
00:09:49: INFO[main]: SourceShaderCache::getOrLoad(): No path found for "/opengl_fragment.asm"
...
00:09:50: INFO[main]: SourceShaderCache::getOrLoad(): Loading path "/windows/D/Small games/Minetest/Minetest_GIT/bin/../client/shaders/test_shader_1/base.txt"
00:09:50: INFO[main]: SourceShaderCache::getOrLoad(): Loading path "/windows/D/Small games/Minetest/Minetest_GIT/bin/../client/shaders/test_shader_1/opengl_vertex.glsl"
00:09:50: INFO[main]: SourceShaderCache::getOrLoad(): Loading path "/windows/D/Small games/Minetest/Minetest_GIT/bin/../client/shaders/test_shader_1/opengl_fragment.glsl"
00:09:50: INFO[main]: SourceShaderCache::getOrLoad(): No path found for "test_shader_1/opengl_geometry.glsl"
00:09:50: INFO[main]: Compiling high level shaders for test_shader_1
00:09:50: INFO[main]: SourceShaderCache::getOrLoad(): Loading path "/windows/D/Small games/Minetest/Minetest_GIT/bin/../client/shaders/test_shader_2/base.txt"
00:09:50: INFO[main]: SourceShaderCache::getOrLoad(): Loading path "/windows/D/Small games/Minetest/Minetest_GIT/bin/../client/shaders/test_shader_2/opengl_vertex.glsl"
00:09:50: INFO[main]: SourceShaderCache::getOrLoad(): Loading path "/windows/D/Small games/Minetest/Minetest_GIT/bin/../client/shaders/test_shader_2/opengl_fragment.glsl"
00:09:50: INFO[main]: SourceShaderCache::getOrLoad(): No path found for "test_shader_2/opengl_geometry.glsl"
00:09:50: INFO[main]: Compiling high level shaders for test_shader_2
00:09:50: INFO[main]: SourceShaderCache::getOrLoad(): Loading path "/windows/D/Small games/Minetest/Minetest_GIT/bin/../client/shaders/test_shader_3/base.txt"
00:09:50: INFO[main]: SourceShaderCache::getOrLoad(): Loading path "/windows/D/Small games/Minetest/Minetest_GIT/bin/../client/shaders/test_shader_3/opengl_vertex.glsl"
00:09:50: INFO[main]: SourceShaderCache::getOrLoad(): Loading path "/windows/D/Small games/Minetest/Minetest_GIT/bin/../client/shaders/test_shader_3/opengl_fragment.glsl"
00:09:50: INFO[main]: SourceShaderCache::getOrLoad(): No path found for "test_shader_3/opengl_geometry.glsl"
00:09:50: INFO[main]: Compiling high level shaders for test_shader_3
00:09:50: INFO[main]: SourceShaderCache::getOrLoad(): Loading path "/windows/D/Small games/Minetest/Minetest_GIT/bin/../client/shaders/bumpmaps_solids/base.txt"
00:09:50: INFO[main]: SourceShaderCache::getOrLoad(): Loading path "/windows/D/Small games/Minetest/Minetest_GIT/bin/../client/shaders/bumpmaps_solids/opengl_vertex.glsl"
00:09:50: INFO[main]: SourceShaderCache::getOrLoad(): Loading path "/windows/D/Small games/Minetest/Minetest_GIT/bin/../client/shaders/bumpmaps_solids/opengl_fragment.glsl"
00:09:50: INFO[main]: SourceShaderCache::getOrLoad(): No path found for "bumpmaps_solids/opengl_geometry.glsl"
00:09:50: INFO[main]: Compiling high level shaders for bumpmaps_solids
00:09:50: INFO[main]: SourceShaderCache::getOrLoad(): Loading path "/windows/D/Small games/Minetest/Minetest_GIT/bin/../client/shaders/bumpmaps_liquids/base.txt"
00:09:50: INFO[main]: SourceShaderCache::getOrLoad(): Loading path "/windows/D/Small games/Minetest/Minetest_GIT/bin/../client/shaders/bumpmaps_liquids/opengl_vertex.glsl"
00:09:50: INFO[main]: SourceShaderCache::getOrLoad(): Loading path "/windows/D/Small games/Minetest/Minetest_GIT/bin/../client/shaders/bumpmaps_liquids/opengl_fragment.glsl"
00:09:50: INFO[main]: SourceShaderCache::getOrLoad(): No path found for "bumpmaps_liquids/opengl_geometry.glsl"
00:09:50: INFO[main]: Compiling high level shaders for bumpmaps_liquids


At first we suspected my video driver (fglrx / proprietary ATI driver) might be broken and OpenGL isn't working system-wide. But all other engines and shaders work fine here and this only happens in Minetest. VanessaE also has my video card and the fglrx driver, and for her shaders worked fine also, making this even more mysterious.

Eventually I suggested her to compile Minetest under Irrlicht 1.8, while I compiled under 1.7 myself. This revealed what the problem was: Minetest shaders are broken with Irrlicht 1.8.2... at least under the fglrx driver. With 1.7.3 shaders work again.

There is another weird thing though: I downloaded the Irrlicht 1.8 SDK and compiled the samples. I ran the shaders sample of Irrlicht and surprisingly, shaders worked. I don't know if they're HLSL or GLSL however. But it would seem that if I compile the samples of Irrlicht 1.8, shaders work... while if I compile Minetest with Irrlicht 1.8, its shaders don't.

Summary: Compiling Minetest with Irrlicht 1.8.* causes shaders to no longer work. Although this is not obvious (I didn't notice for months), a higher debug level reveals issues about shader files not being found or interpreted correctly. However, this only seems to happen on Linux and with the fglrx driver... other people seem to have working shaders with Minetest on Irrlicht 1.8.

PostPosted: Fri Jul 05, 2013 09:56
by MirceaKitsune
Just upgraded my fglrx driver, from 9.012 to 12.104. With both of them the issue still persists, and shaders don't work when building Minetest against Irrlicht 1.8.2 (but do work against 1.7.3).

PostPosted: Fri Jul 05, 2013 15:36
by Inocudom
I am getting this error too. It looks like Irrlicht 1.8.2 has a few issues. People may or may not find this hard to believe, but Irrlicht never went beyond supporting DirectX 9 when it comes to DirectX. My card is a GeForce GT 610 and my operating system is Windows 7 64-Bit, but the bump mapping of Minetest does not work on it. Cube 2 showed me that my computer is capable of bump mapping, so there can't be anything wrong with it.

PostPosted: Fri Jul 05, 2013 19:14
by addi
there is an tutorial /example for irrlicht 1.8 wich has great and good working bump mapping.
http://irrlicht.sourceforge.net/docu/example011.html
maybe you can compile it and test it.

it works for me correctly and if its work for you, than it must be a problem of minetest itself. if it dont work for you than its maybe a problem of irrlicht or your driver

PostPosted: Sat Jul 06, 2013 17:40
by Inocudom
Well, this topic died really fast. I was hoping that there was a way that this issue could be fixed.