View Full Version : Can I cut a 2D texture into slices?

03-21-2010, 01:13 PM
Hi everyone

Is it possible to generate a 3D texture out of an existing 2D texture?

I've been trying to render a volume out of an 2D texture. In order to do so, I somehow need to query the texels in a 2D texture.

I basically followed the idea pointed out on

My 2D texture has width=128, height=128 and texels of 128 bits. I wondered if it might be possible to cut that 2D texture into 128 slices, so that I could store it in a 3D texture. Each "slice" should therefore have a depth of exactly 1 bit.

As a 3D texture is basically a stack of 2D textures, I thought I might be able to query for a certain slice in the 3D texture.