Shader problems?

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
Beroc
Posts: 18
Joined: Fri Sep 28, 2007 3:25 pm

Shader problems?

Post 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.
andres
Competition winner
Posts: 78
Joined: Tue Jul 08, 2008 5:18 pm
Location: Guarapuava/Brazil
Contact:

Post by andres »

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

Image
Beroc
Posts: 18
Joined: Fri Sep 28, 2007 3:25 pm

Post 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.
DavidJE13
Posts: 165
Joined: Tue Jan 09, 2007 7:17 pm

Post by DavidJE13 »

Check the console for any error messages. Usually the shader compiler will explain why it didn't work there.
Beroc
Posts: 18
Joined: Fri Sep 28, 2007 3:25 pm

Post 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.
Beroc
Posts: 18
Joined: Fri Sep 28, 2007 3:25 pm

Post 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.
vitek
Bug Slayer
Posts: 3919
Joined: Mon Jan 16, 2006 10:52 am
Location: Corvallis, OR

Post by vitek »

Did you rebuild the Irrlicht library after you made your changes?

Travis
omar shaaban
Posts: 616
Joined: Wed Nov 01, 2006 6:26 pm
Location: Cairo,Egypt
Contact:

Post by omar shaaban »

vitek wrote:Did you rebuild the Irrlicht library after you made your changes?

Travis
lol :lol:
Post Reply