depth cubemap

Hello,

I’m trying to implement omni-directional lights shadows via layered rendering into a depth cubemap :wink:
Environment: WinXP, Radeon 2400HD, Catalyst 9.10, OpenTK

Created cube-map parameters:
Internal pixel format: DepthComponent
Pixel format: DepthComponent
Pixel type: Float

Attaching it (as depth) to an empty FBO via Arb.FramebufferTexture (using ARB extension as the function is in GL-3.2 core, but unfortunately Catalyst doesn’t support 3.2 at the moment).

The first thing I tried is clearing the buffer:
GL.ClearDepth( 1.0 )
GL.Clear( ClearBufferMask.DepthBufferBit )

I’m testing the result by binding the texture followed by the call:
GL.GetTexImage( TextureTarget.TextureCubeMapPositiveX, 0, PixelFormat.DepthComponent, PixelType.Float, ar)
where ar is a float array

Surprisingly, only PositiveX values appear as 1.0. Others like PositiveY & PositiveZ seem like contain the garbage :(.

Does anybody have this experience and ready to share it?
Maybe some working configurations with pieces of code?

Thanks in advance. :smiley:

Hi Dmitry, I got no experience with depth cube maps, but why not use dual-paraboloids? It will require two passes instead of 6.

I used them heavily in the previous iteration of my engine.
Unfortunately, they are very tricky to get looking good.
Moreover, they suffer from non-tessellated geometry, where I aim to low-poly characters.

The cube map is the most fair alternative.
With latest GL-3.2 features (layered rendering into a depth cube-map), this approach gains a lot of performance (theoretically for now).

Something related to this?

http://grail.cs.washington.edu/projects/ldi/ldi.pdf

Very interesting.