More textures for the shader / recompile Irrlicht with 8 txt

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
Valmond
Posts: 308
Joined: Thu Apr 12, 2007 3:26 pm

More textures for the shader / recompile Irrlicht with 8 txt

Post by Valmond »

Hello !

I'v started building a splatter material for the terrain node,
so far I have a shader that blends 3 textures (1 texture has the alphas coded in its base colours + 3 textures).


This works OK but I'd like another texture plus an alphamap end so on...

So I rebuilt Irrlicht with
MATERIAL_MAX_TEXTURES = 8;

and added an extra texture but the new texture is just plain black.
(everything else works OK).


I'm on Windows but running Irrlicht under OGL (saw a thread that mentioned that this "fix/hack" doesn't work with DirectX and right enough, with DX drivers it crashes but I'm okay with OpenGL ^^).


So the question is, what should I do to make this evil 5:th texture work ?


Thanks !
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

IIRC you can't at the moment, because things like texture matrices will throw up and make everything pretty much wrong. There's an open tracker ticket about this issue, so we'll work on this problem anytime soon.
Valmond
Posts: 308
Joined: Thu Apr 12, 2007 3:26 pm

Post by Valmond »

Thanks for the fast answer ;)

Might it work with an older version of Irrlicht?
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Maybe in 1.1, as that was the last version without texture matrices IIRC. But I wouldn't go for that...
Valmond
Posts: 308
Joined: Thu Apr 12, 2007 3:26 pm

Post by Valmond »

would it be a huge job (for me) to try to build a workaround for this ?

only for OpenGL (or DirectX) for example.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Don't know how much effort it would be, just start with it and give some feedback so others (like me) won't have to go through all the details again.
The major problem will be the texture layer handling, and the fact that texture matrices drop in to the transformation matrix array. You might want to have a look at the latest SVN/trunk code, as some things have changed there - could be much easier now to go for more than 4 textures.
Valmond
Posts: 308
Joined: Thu Apr 12, 2007 3:26 pm

Post by Valmond »

Thanks!

Ill get back to you if I'll get things rolling :mrgreen:
drhenry
Posts: 16
Joined: Fri Mar 26, 2010 8:03 am

Post by drhenry »

I've come across the same issue. Have there any changes been made to Irrlicht concerning the maximum texture restriction of 4 textures? Can I now in Irrlicht 1.7.1 just change the _IRR_MATERIAL_MAX_TEXTURES_ definition to let's say 8?
Post Reply