Hello,
I’m trying to implement omni-directional lights shadows via layered rendering into a depth cubemap
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.