[QtonPi] Graphics Banding problems

Samuel Rødal samuel.rodal at nokia.com
Thu Sep 13 12:15:33 CEST 2012


On 09/11/2012 06:26 PM, ext Doug Bradbury wrote:
> Hello again.
> We've been having some trouble with pretty significant banding when
> displaying gradients / shader effects.  Even when running the example
> from /opt/vc/src/hello_pi/hello_triangle2, I get an image that seems to
> have severe banding issues. That is, the transition between colors isn't
> smooth/seemless, but rather there appear to be bands as if my bit-depth
> configuration was very low.

With which display? It might not be a hardware configuration issue on
the raspberry pi itself.

> I don't have a screenshot of the running example, but if you look
> here:http://en.wikipedia.org/wiki/File:Colour_banding_example01.png
> my rendering looks like the 8-bit gradient.
> 
> I've been reading through forums and trying out everything I could find,
> but the banding still occurs.
> 
> I am on the Raspbian image with QT 5 installaed. I am connected through
> HDMI. This happens both with and w/o XWindows. I have tried increasing
> the graphics memory by replacing /boot/start.elf with the
> arm128_start.elf, but no luck. I also tried editing a configuration file
> to force 24-bit graphics (forgot where that was already), but that
> didn't work either.
> 
> Not sure what else to do or where else to look. Any pointers?

For displays with less than 8-bits per pixel precision and no built-in
dithering support we could try to do some dithering in the eglfs
platform plugin in the call to swapBuffers(). Or maybe there are some
EGL extensions / flags that can be set. Someone with access to such a
display would need to experiment.

It's also possible to do the dithering in the application, as a
work-around for lack of system / lighthouse plugin dithering. In QML for
example, a semi-transparent dithering mask can be overlaid the rest of
the scene using a screen sized tiled Image element at the end of the
main QML element.

--
Samuel



More information about the QtonPi mailing list