Game Development Community

3D (volumetric) texture support ?

by Henri Aalto · in Torque Game Engine Advanced · 01/31/2008 (3:26 am) · 5 replies

Hello.


Just a quick question.. does anyone know whether TGEA supports 3D textures (in DDS-format DXT1/3/5) and how should they be introduced in the code to be passed for a shader?

#1
01/31/2008 (3:57 am)
No they are not supported.
DDS support is a hacked in thing that does not support more than DXT most likely (not even sphere / cube map) so if you want something like that, have a look at the dds implementation and extend it where needed :)
#2
01/31/2008 (9:34 am)
Thanks for the info. I would have liked to test some terrain shading based on the works of Ves and Bobby Leighton, basically using 3D textures for improved performance (the method I was thinking has some limitations over the others but it should work well enough).


To GarageGames: any intentions of fully implementing the DDS/DXT? There are a lot of nice things to be achieve, like using a cubemap / DXT compressed textures on skyboxes to consereve GPU memory etc.
#3
01/31/2008 (10:13 am)
Why not just set up your own volumetric texture? There are a couple of places that do something similar for lighting purposes. I mean, really, it's just an array of textures, anyway.
#4
01/31/2008 (11:30 am)
@Ross: any pointers and directions are welcome :)


I know some basic shader stuff but the inner workings of the rendering portion of the engine and the GFX-framework are pretty much a mystery to me. I'll check out what I can learn about the texture arrays...
#5
01/31/2008 (1:28 pm)
Loading in 3D textures should be straightforward. You'll have to load the texture data yourself, but once you have you can call GFX->getTextureManager()->createTexture(width, height, depth, ptrToTextureData, GFXFormatR8G8B8A8, &GFXDefaultStaticDiffuseProfile); to create a 3D texture. I'm not sure if that'll work with compressed textures, but it's worth a shot (just remember to change GFXFormatR8G8B8A8 to the format you actually want, e.g. GFXFormatDXT5).