Over 8 Texture support

Discuss about anything related to the Irrlicht Engine, or read announcements about any significant features or usage changes.
Post Reply
Ovan
Posts: 70
Joined: Thu Dec 18, 2008 12:41 am
Contact:

Over 8 Texture support

Post by Ovan »

Hello, i'm using lastest svn
and in certain version It's possible to use more than 8 texture surly a bug when i see they architecture
but now or other some realease I get a crash on IrrAllocator with getTextureMatrix I have checked why
and it's possible to avoid it just to add some enum value on E_TRANSFORMATION_STATE

so my question is why the default (internal) maximum texture are limited to 8 texture, when some hardware can be use 32 layer if it simply just need to add some ETS_TEXTURE_X ?
or why not use a new enum format ?

Code: Select all

 
    enum E_TRANSFORMATION_STATE
    {
        //! View transformation
        ETS_VIEW = 0,
        //! World transformation
        ETS_WORLD,
        //! Projection transformation
        ETS_PROJECTION,
        //! First Texture transformation
        ETS_TEXTURE_FIRST,
        //! Last Texture transformation
        ETS_TEXTURE_LAST = ETS_TEXTURE_FIRST +_IRR_MATERIAL_MAX_TEXTURES_-1,
        //! Not used
        ETS_COUNT
    };
 
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Re: Over 8 Texture support

Post by hybrid »

Yes, the fixes for more textures are not yet finished. Changes to the texture matrix enums and other things will follow later.
Ovan
Posts: 70
Joined: Thu Dec 18, 2008 12:41 am
Contact:

Re: Over 8 Texture support

Post by Ovan »

ok, thanks
hendu
Posts: 2600
Joined: Sat Dec 18, 2010 12:53 pm

Re: Over 8 Texture support

Post by hendu »

You can work around this if your hw supports texture arrays, see my patch in the discussion forum. For example my hd4350 reports it supports 8192 layers in one texture array.
Ovan
Posts: 70
Joined: Thu Dec 18, 2008 12:41 am
Contact:

Re: Over 8 Texture support

Post by Ovan »

yes, thank hendu, I see this patch, surly a great feature

but some question:

performance issue ?
maximum texture size affected ?
can use different texture size ?
texture coord are shared ?

There is for my terrain engine with GLSL splatting, but who use GL_TEXTURE_2D_ARRAY in GLSL ?
I see it's a sampler2DArray, the z value is the texture index ? possible to detect the end of they array without specific uniform ?

this feature extend the max color map to 2048 (4texture by color map) and 8192 material texture, with only "two" texture layer used ?
uhm ... I'm septic

ps: I'm not strong in english, i think, sorry
hendu
Posts: 2600
Joined: Sat Dec 18, 2010 12:53 pm

Re: Over 8 Texture support

Post by hendu »

performance issue ?
maximum texture size affected ?
can use different texture size ?
texture coord are shared ?
No perf issue.
Max texture size is usually the same as normal textures, depends on the hw.
All textures in an array must be the same size.
Texcoords, that's up to you, your shader can generate them from anywhere.
There is for my terrain engine with GLSL splatting, but who use GL_TEXTURE_2D_ARRAY in GLSL ?
I see it's a sampler2DArray, the z value is the texture index ? possible to detect the end of they array without specific uniform ?
Anyone who uses this ;)
Yes, z is depth, and no, the array size is not available to the shader, you must pass it somehow.
this feature extend the max color map to 2048 (4texture by color map) and 8192 material texture, with only "two" texture layer used ?
uhm ... I'm septic
Yes, if I understood you correctly.
Nadro
Posts: 1648
Joined: Sun Feb 19, 2006 9:08 am
Location: Warsaw, Poland

Re: Over 8 Texture support

Post by Nadro »

My 5 cents about texture arrays performance. On Radeon HD2k filtering operations are 2x more expensive for texture arrays than for standard 2d textures. For HD3k+ as Hendu said, the cost of texture arrays are the same as for 2D textures. What about limits? My GF9k series report that 256 textures per layer are available, but this isn't a problem I think :)
Library helping with network requests, tasks management, logger etc in desktop and mobile apps: https://github.com/GrupaPracuj/hermes
Ovan
Posts: 70
Joined: Thu Dec 18, 2008 12:41 am
Contact:

Re: Over 8 Texture support

Post by Ovan »

woot, thank you for there awsome

see you later
Post Reply