I was tinkering with 1.6 of Irrlicht and found that the shaders don't seem to be loading correctly. To test this, I went back to the Shaders tutorial and rebuilt it. The 3 blocks appeared black. I ran the original 10.Shaders.exe and it ran fine. Is there some problem that needs to be addressed here, or is it just my system?
I would give code, but it all exists in the Shaders tutorial.
Shader problems?
-
- Competition winner
- Posts: 78
- Joined: Tue Jul 08, 2008 5:18 pm
- Location: Guarapuava/Brazil
- Contact:
check the path to the shader file, you program probably not load the shader, so it goes black.
Prof. Andres Jessé Porfirio
Federal Technological University of Parana (UTFPR)
www.andresjesse.com
http://irrrpgbuilder.sourceforge.net
Federal Technological University of Parana (UTFPR)
www.andresjesse.com
http://irrrpgbuilder.sourceforge.net
The shader paths were not changed in the tutorial. (see the code below)
I made the 10.Shaders.exe in teh same folder that it started from, after renaming the original file to keep it. I ran both files. The old one shows the shaders, the new one does not.
Going back to version 1.5. I did the same tests, and in both cases the shaders work.
I made the 10.Shaders.exe in teh same folder that it started from, after renaming the original file to keep it. I ran both files. The old one shows the shaders, the new one does not.
Code: Select all
psFileName = "../../media/opengl.frag";
vsFileName = "../../media/opengl.vert";
FOUND IT!!! but... it is a bug.
The only thing I changed in the engine was in IrrCompileConfig.h. I changed line 102 from this:
#define _IRR_MATERIAL_MAX_TEXTURES_ 4
to this:
#define _IRR_MATERIAL_MAX_TEXTURES_ 6
Done so that I could use 6 textures in my terrain splatting Shader.
This has to be a bug, so I will post this up in the Bugs section.
The only thing I changed in the engine was in IrrCompileConfig.h. I changed line 102 from this:
#define _IRR_MATERIAL_MAX_TEXTURES_ 4
to this:
#define _IRR_MATERIAL_MAX_TEXTURES_ 6
Done so that I could use 6 textures in my terrain splatting Shader.
This has to be a bug, so I will post this up in the Bugs section.
-
- Posts: 616
- Joined: Wed Nov 01, 2006 6:26 pm
- Location: Cairo,Egypt
- Contact: