High Perscision Frame Buffer

Using a off screen buffer via an additional camera ,is it possible to get higher precision textures than 24bit (32bit with alpha). Is it possible to genereate a 32bit floating texture (gray’s only)? Or perhaps, 16-32 bits per channel? What would be the syntax for that?

High-resolution color is possible, if your hardware supports it. Note that a very large number of graphics cards do not. Also note that no hardware can render a grayscale framebuffer; so you can’t get a 16-bit grayscale texture, but it is possible to get a 48-bit color texture.

If you’re talking about a floating-point depth-buffer texture, this is not currently supported in Panda (but it will be soon).

When you render into an offscreen buffer, it is usually easiest if your offscreen framebuffer format matches your onscreen framebuffer format. This allows Panda to share one graphics context between both framebuffers. Otherwise, you will have to duplicate all of your textures and vertex buffers twice, wasting framebuffer memory.

So if you want to capture a 48-bit texture, the easiest way is to open a 48-bit window in the first place. You can do this by putting the following in your Config.prc:

color-bits 48

This is just a request. If your graphics card does not support 48-bit framebuffers, it will open a the largest framebuffer it can instead. You can find out what kind of framebuffer you got with:

print base.gsg.getProperties()

If you really do want to open a 24-bit window with a 48-bit offscreen buffer, that’s possible too, but more complicated.