render to texture format

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
genesys
Posts: 75
Joined: Tue Nov 02, 2004 6:49 pm
Contact:

render to texture format

Post by genesys »

I need to change the format for my rendertotexture render targets! (for example A8R8G8B8 or G16R16 or R32F and so on...)


How can i do that?!


THX!
Phenix
Posts: 51
Joined: Sat Nov 15, 2003 3:15 pm
Location: Earth
Contact:

Post by Phenix »

The format of render target textures, if you use direct3d9 renderer, depends on the format of the backbuffer, I don't know much about openGL, I've looked at the source of openGL renderer now and it looks like it creates always ECF_A1R5G5B5 textures.
You've got to mod the engine to choose the format you like, especially if you want to use formats not supported natively in Irrlicht, like G16R16 and R32F.
But consider that some formats are available only on newest hardware, like R32F that is available only in radeon 9500 and above and in newest geforceFX and above.
I use R32F to generate heightmaps in hardware.
genesys
Posts: 75
Joined: Tue Nov 02, 2004 6:49 pm
Contact:

Post by genesys »

what formats are supported natively in irrlicht?

what format would you suggest for shadowmapping? At the moment i'm using G16R16 because i'm experiancing the best results with that format (not in irrlicht). I can't really explain why, but i'm getting rounded shadowmap pixel instead of blocky ones (without any sampling)...


Is there a list what formats are supported on which hardware?
Phenix
Posts: 51
Joined: Sat Nov 15, 2003 3:15 pm
Location: Earth
Contact:

Post by Phenix »

Irrlicht doesn't support many formats, look at the enum video::ecolor_format, just some standard 16 and 32 bit integer formats.
I've got no idea about shadow mapping.
If you have got the directX9 SDK there is a pretty good list of the formats supported on video cards; Start the direct3d SDK sample browser, there is a paper called Graphics Card Capabilities.
Post Reply