Page 1 of 1

Shader problems?

Posted: Mon Oct 12, 2009 3:58 pm
by Beroc
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.

Posted: Mon Oct 12, 2009 5:35 pm
by andres
check the path to the shader file, you program probably not load the shader, so it goes black.

Posted: Mon Oct 12, 2009 6:08 pm
by Beroc
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.

Code: Select all

			psFileName = "../../media/opengl.frag";
			vsFileName = "../../media/opengl.vert";
Going back to version 1.5. I did the same tests, and in both cases the shaders work.

Posted: Mon Oct 12, 2009 7:02 pm
by DavidJE13
Check the console for any error messages. Usually the shader compiler will explain why it didn't work there.

Posted: Mon Oct 12, 2009 7:39 pm
by Beroc
Tested that between 1.5 and 1.6, again the only one that fails is the one I compiled using the tutorial in 1.6.

The only difference in any of the consoles is that the Irrlicht engine is 1.5 in one set, and 1.6 in the other. There is no indication that the shaders are failing.

Posted: Mon Oct 12, 2009 9:40 pm
by Beroc
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.

Posted: Tue Oct 13, 2009 12:33 am
by vitek
Did you rebuild the Irrlicht library after you made your changes?

Travis

Posted: Wed Oct 14, 2009 5:45 am
by omar shaaban
vitek wrote:Did you rebuild the Irrlicht library after you made your changes?

Travis
lol :lol: