Question

I have a framebuffer with multiple render targets. All of them are textures and not renderbuffers. How can I use the A component of a RGBA texture as depth attachment? I want to use the default depth test.

Was it helpful?

Solution

The alpha is not a depth component. And only images who's formats have a depth component can be bound to GL_DEPTH_ATTACHMENT.

And before you ask, there is no RGB_DEPTH_COMPONENT format.

There's no reason you can't create a texture with GL_DEPTH_COMPONENT24.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top