Only 16 grays in imagegen
I have a weird problem with an imagegen plug-in I wrote.
I'm using it to display grayscale images (though the plug-in
technically accepts 32-bit RGBA) on a TEXQUAD.
The plug-in works fine *except* on one machine. On that
one machine, the plug-in only displays 16 levels of gray.
A smooth gradient from black to white turns into a
series of stripes.
Some experiments imply that the lower 4 bits of each byte
are being discarded (e.g. when I set all R and G components
to 0, I got 16 shades of blue). The bytes are fine when I
write them into the osg::Image, so it's happening after that.
It doesn't seem to be a hardware limitation of the
machine: it displays textures read from a grayscale JPEG
just fine.
Is there something in the imagegen support code that
would cause something like this?
__________________
-- Dan Merget
|