From: Brian P. <br...@va...> - 2001-03-08 15:38:21
|
Back in October, luc-eric rousseau wrote: > > Hello, > for research, I would like to modify Mesa to support 16 bit per channel > texture, as well as a higher precision render buffers, either 16 bit or > single-precision floating point. > > The goal here is to use Mesa to render (non-interactivly) in software high > precision 3D images made with 16 bit texture source, without loss of > quality. The current precision of the vertex coordinates is fine, it's the > precision of the shading and the alpha blending that matters. The rendered > images are not meant for PC monitors (which are only 8 bit per channel max). > > My question is: how much trouble would it be? Of course, I've already > looked at the source, but I would like to get an idea of how much of the > code I would have to change, and if there are roadblocks I would hit. I > should also point out that i'm lazy :^) Got some good news for you. Mesa now has support for 16-bit color channels. There's probably a number of bugs to fix yet but I ran some tests last night and it seems to work. I haven't exercised texturing yet so there could be problems there. If you want to play with it, here's what you have to do: 1. Get the latest Mesa CVS trunk code. 2. Edit src/config.h and change CHAN_BITS to 16. 3. Edit src/Makefile.X11 and remove DRIVER_SOURCES from the OBJECTS assignment. 4. make -f Makefile.X11 linux-debug (this'll help if you find bugs) 5. Mesa/tests/osdemo16.c is a modified version of the osdemo.c program which renders a 16-bit/channel image and writes it as an 8-bit/channel targa file (dropping the least significant bits). Only the OSMesa interface supports 16-bit channels at this time. Let me know how it works if you try it. -Brian |