PDA

View Full Version : Depth Buffer => TexImage3d



pocketmoon
09-09-2002, 06:36 AM
Hi Folks,

As the song says - 'there are more questions than answers'. Especially from me! But I appreciate all the help and advice http://www.opengl.org/discussion_boards/ubb/smile.gif

So...

Nvidia Specific. I want to render a scene multiple times and capture the depth buffer and build up a 3D depth map texture.

Any suggestions as to the most efficient way to do this ?

Currently I'm thinking pbuffer/SGIX_DEPTH_COMPONENT and then just copy on the host side to a Tex3D HILO texture.


Rob J.

NitroGL
09-09-2002, 07:01 AM
You could use glCopyTex(Sub)Image3D, but I'm not sure if you can use the depth texture format on 3D textures...

mcraighead
09-09-2002, 03:16 PM
You definitely can't have 3D depth textures; see the ARB_depth_texture extension. It doesn't make sense to compare against the R coordinate there.

- Matt

solarforge
09-09-2002, 06:37 PM
I get the impression he wants to build a series of 2D depth textures, or maybe create single 3D texture... which technically isn't a problem...

The problem is getting performance out of it any which way he goes about it as he is rendering the scene (I assume) in slivers, meaning for a 64x64x64 map he is looking at 64 rendering passes (less with optimisations of course)...

So, they original method should be one of the faster methods for that particular approach.

pocketmoon
09-09-2002, 10:57 PM
Originally posted by solarforge:
I get the impression he wants to build a series of 2D depth textures, or maybe create single 3D texture... which technically isn't a problem...

The problem is getting performance out of it any which way he goes about it as he is rendering the scene (I assume) in slivers, meaning for a 64x64x64 map he is looking at 64 rendering passes (less with optimisations of course)...

Some blues clues http://www.opengl.org/discussion_boards/ubb/smile.gif

I want to construct a 3D texture containing 16bit values, which just happen to be depth, hence the HILO (16bit) format? I'll be accessing the 3D 'depth' map programatically in an NV30 FP (emulation driver of course).

I'll only be looking at around 5 passes since I only want the first few (5) occluders.

Rob J.