Depth Buffer => TexImage3d

Hi Folks,

As the song says - ‘there are more questions than answers’. Especially from me! But I appreciate all the help and advice

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.

You could use glCopyTex(Sub)Image3D, but I’m not sure if you can use the depth texture format on 3D textures…

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

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.

Originally posted by solarforge:
[b]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)…[/b]

Some blues clues

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.