3D 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
numzero
Posts: 2
Joined: Sun Jan 22, 2017 3:54 pm

3D textures

Post by numzero »

Is it possible to use 3D textures (not cube maps) with Irrlicht?
Mel
Competition winner
Posts: 2292
Joined: Wed May 07, 2008 11:40 am
Location: Granada, Spain

Re: 3D textures

Post by Mel »

Not yet. You can create workarounds, though, which isn't very hard either :)
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt
Cube_
Posts: 1010
Joined: Mon Oct 24, 2011 10:03 pm
Location: 0x45 61 72 74 68 2c 20 69 6e 20 74 68 65 20 73 6f 6c 20 73 79 73 74 65 6d

Re: 3D textures

Post by Cube_ »

Easiest workaround is to just generate a 2D slice of whatever plane you currently want to apply the 3D texture to
"this is not the bottleneck you are looking for"
numzero
Posts: 2
Joined: Sun Jan 22, 2017 3:54 pm

Re: 3D textures

Post by numzero »

> generate a 2D slice

It does something similar now. I just though GPU would do that faster and better.
Cube_
Posts: 1010
Joined: Mon Oct 24, 2011 10:03 pm
Location: 0x45 61 72 74 68 2c 20 69 6e 20 74 68 65 20 73 6f 6c 20 73 79 73 74 65 6d

Re: 3D textures

Post by Cube_ »

you could do that using the GPU using CUDA/OpenCL - iirc there's no builtin way to do that in most drivers, so if irrlicht did support it it'd probably slice it as needed, either on GPU or off GPU.

You could also just make a texture array with so many slices (whatever resolution you feel is reasonable) and then just use alpha blending (or something more sophisticated) to handle slices that cover multiple levels of the array (say a diagonal cut through a cube).

Although that's potentially ugly.
"this is not the bottleneck you are looking for"
devsh
Competition winner
Posts: 2057
Joined: Tue Dec 09, 2008 6:00 pm
Location: UK
Contact:

Re: 3D textures

Post by devsh »

Our fork of Irrlicht supports 2D texture arrays, 3D textures and TBOs https://github.com/buildaworldnet/IrrlichtBAW
Granyte
Posts: 850
Joined: Tue Jan 25, 2011 11:07 pm
Contact:

Re: 3D textures

Post by Granyte »

If you are using ogl devsh fork has 3d texture and 2d arrays
if you are using dx i there is a version of the shader pipeline branch that has 3d texture and 2d arrays support
devsh
Competition winner
Posts: 2057
Joined: Tue Dec 09, 2008 6:00 pm
Location: UK
Contact:

Re: 3D textures

Post by devsh »

I will most probably push a new version to GIT sometime tomorrow or early next week... looking for testers :D
Post Reply