Off-screen rendering into compressed textures

Started by Kai, January 31, 2009, 13:14:20

Previous topic - Next topic

Kai

Hi,

I am heavily using off-screen rendering with FBOs and shaders to procedurally generate textures.
The problem now is that these textures would consume too much VRAM.
I know that there is a possibility to create compressed textures when already having either the compressed data or the uncompressed data in a buffer to be handled to the GL driver, but I have neither.
Of course, it would be possible to read-back the generated uncompressed texture data and use the above approach to compress it in a new texture, but I wondered if there would be another solution to directly create a compressed texture while rendering to the FBO.

Does anyone know if it is possible and how?

spasi


Kai

Thanks spasi!

It looks as if there is no other solution to this but to reimplement the compression algorithms in a shader.

I also scanned the FBO specification for this and it states that none of the compressed texture formats are "color-renderable".
So it seems to be definitely not possible to do such a thing with FBOs.

broumbroum

I do off-screen rendering throughout a Java2D Sprite pipeline which is then forwarding to a GL Texture buffer. This is slow if rendering each frame offscreen, but faster if rendering once on the loading time. E.g. I can load alphbet. characters in Java2D and then load into a GL Texture buffer for printing at any time.

Kai

QuoteI do off-screen rendering throughout a Java2D Sprite pipeline which is then forwarding to a GL Texture buffer. This is slow if rendering each frame offscreen, but...

I fail to see how this is related to do off-screen rendering into a compressed texture.

The fact that off-screen rendering is possible with Framebuffer objects and uncompressed textures, is something I'm well aware of but I wanted to save memory by rendering directly into compressed textures, which, according to the FBO extension specification, is not possible.