_IRR_MATERIAL_MAX_TEXTURES_

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
Auria
Competition winner
Posts: 120
Joined: Wed Feb 18, 2009 1:11 am
Contact:

_IRR_MATERIAL_MAX_TEXTURES_

Post by Auria »

Hi,

is there a reason why _IRR_MATERIAL_MAX_TEXTURES_ is 4 by default? Let's imagine a case where I want to have splatting and a lightmap. I need one texture for the splatting layout, another texture for the lightmap, which leaves only two textures available for actual splatting textures.

Now I know that this is configurable - so on OSX and Windows no problem, we can use our own build with _IRR_MATERIAL_MAX_TEXTURES_ at 8. But Linux is a tougher one : in general on Linux irrlicht would be retrieved from package managers, which would use the default settings.

So I wonder if there is a possibility that _IRR_MATERIAL_MAX_TEXTURES_ could be increased by default, so that our capabilities are not limited when people obtain irrlicht from their linux software repositories? Or else a way to work around this problem

Thanks
3DModelerMan
Posts: 1691
Joined: Sun May 18, 2008 9:42 pm

Re: _IRR_MATERIAL_MAX_TEXTURES_

Post by 3DModelerMan »

I'm not sure if most graphics cards support more than 4 textures, though I could be wrong... Four textures gives you 16 floats per-pixel though, so it's still an awful lot of data. Eight textures might eat up a lot of your performance budget. If you pack the splatting into the different channels you would be able to have 4 splat maps per splat texture.
That would be illogical captain...

My first full game:
http://www.kongregate.com/games/3DModel ... tor#tipjar
Auria
Competition winner
Posts: 120
Joined: Wed Feb 18, 2009 1:11 am
Contact:

Re: _IRR_MATERIAL_MAX_TEXTURES_

Post by Auria »

3DModelerMan wrote:I'm not sure if most graphics cards support more than 4 textures, though I could be wrong... Four textures gives you 16 floats per-pixel though, so it's still an awful lot of data. Eight textures might eat up a lot of your performance budget. If you pack the splatting into the different channels you would be able to have 4 splat maps per splat texture.
the splatting map itself is already packed in the channels; what I am referring to are the actual textures, like grass, dirt, rock

Well if most GPUs don't support that we will need to work around that
Auria
Competition winner
Posts: 120
Joined: Wed Feb 18, 2009 1:11 am
Contact:

Re: _IRR_MATERIAL_MAX_TEXTURES_

Post by Auria »

Alright doing some research I found this : http://www.gamedev.net/topic/444809-use ... with-glsl/

so it would look like the basic pipeline usually supports 4, however there appears to be an ARB extension that widely supports up to 16. Then my question would rather be, does irrlicht have a way to use those ARB textures? (MAX_TEXTURE_IMAGE_UNITS_ARB)
Post Reply