On Sunday 14 October 2007 11:34:41 am Stefan Dösinger wrote:
What does a depth texture return for red, green, blue and alpha when sampled by a pixel shader, or a vertex shader via VTF? Does it work with fixed function fragment processing? It may be a workable solution if the returned channels match, since it doesn't have the texture rectangle restriction.
According to the ARB spec, whenever a depth texture is used for color, it behaves like a luminance texture, so I'd assume r, g, and b would be the depth value, and alpha would be 1. I'm just not sure if you can attach a depth texture to a color attachment on fbos..