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.
Asked
Active
Viewed 736 times
1

danijar
- 32,406
- 45
- 166
- 297
1 Answers
1
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
.

Nicol Bolas
- 449,505
- 63
- 781
- 982