PDA

View Full Version : How to render to single channel float cubemap texture?



991060
11-03-2004, 05:58 PM
This is basically the need of my shadow mapping project. Since I only need the depth information, it's a waste to use all 3 channels. And to accommodate point light, I need to render to a cubemap. Is there any method to render to single channel float buffer which can be binded to a cubemap texture afterwards? If so, whats the key parameter when creating the pbuffer and the texture? Thanks.

BTW, I'm using ATI_texture_float for now.

jwatte
11-04-2004, 07:56 PM
There's a trick where you can render the six cube faces all into a single texture, and then use texture coordinate scale and offset (looked up through a small cube texture) when reading back to sample the right sub-section of the large 2D texture. That way, you don't need to bind six different targets and all that jazz.