Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Poor graphics / Banding issues
Forum Update on Monday, May 27th 2025

Poor graphics / Banding issues

Scheduled Pinned Locked Moved Solved General and Desktop
8 Posts 3 Posters 2.2k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F Offline
    F Offline
    Francky033
    wrote on last edited by
    #1

    When I'm running my program, I get an image that seems to have severe banding issues. That is, the transition between colors isn't smooth, but rather there appear to be bands. I suppose my problem is coming from a bit-depth configuration too low (8 bits).
    How to configure with QT and OpenGl better floating-point textures and get a better rendering? ?

    0_1516975935904_bands.png

    Thanks !

    raven-worxR 1 Reply Last reply
    0
    • F Francky033

      When I'm running my program, I get an image that seems to have severe banding issues. That is, the transition between colors isn't smooth, but rather there appear to be bands. I suppose my problem is coming from a bit-depth configuration too low (8 bits).
      How to configure with QT and OpenGl better floating-point textures and get a better rendering? ?

      0_1516975935904_bands.png

      Thanks !

      raven-worxR Offline
      raven-worxR Offline
      raven-worx
      Moderators
      wrote on last edited by
      #2

      @Francky033 said in Poor graphics / Banding issues:

      When I'm running my program

      you should be more specific what your application consists of.
      What are you displaying and how specifically.

      --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
      If you have a question please use the forum so others can benefit from the solution in the future

      1 Reply Last reply
      0
      • F Offline
        F Offline
        Francky033
        wrote on last edited by
        #3

        Yes... I'm sorry...
        It's a planetarium and I'm trying to get a good quality sky gradient on the horizon. I use Qt 5.10 and opengl 3.0.
        I created a vertical tube that has a transparency of 0.0 at its top and 1.0 at its base that allows to get this gradient. But the result is mediocre, with irregularities appearing in the colors...
        I suppose that an 8-bit buffer of each color doesn't allow good quality gradients...
        I tried to increase the size of the buffers of each color.

        from that
        format. setBlueBufferSize (8);
        format. setRedBufferSize (8);
        format. setGreenBufferSize (8);
        to :
        format. setBlueBufferSize (16);
        format. setRedBufferSize (16);
        format. setGreenBufferSize (16);

        but without success..

        How can we improve things?

        raven-worxR 1 Reply Last reply
        0
        • F Francky033

          Yes... I'm sorry...
          It's a planetarium and I'm trying to get a good quality sky gradient on the horizon. I use Qt 5.10 and opengl 3.0.
          I created a vertical tube that has a transparency of 0.0 at its top and 1.0 at its base that allows to get this gradient. But the result is mediocre, with irregularities appearing in the colors...
          I suppose that an 8-bit buffer of each color doesn't allow good quality gradients...
          I tried to increase the size of the buffers of each color.

          from that
          format. setBlueBufferSize (8);
          format. setRedBufferSize (8);
          format. setGreenBufferSize (8);
          to :
          format. setBlueBufferSize (16);
          format. setRedBufferSize (16);
          format. setGreenBufferSize (16);

          but without success..

          How can we improve things?

          raven-worxR Offline
          raven-worxR Offline
          raven-worx
          Moderators
          wrote on last edited by
          #4

          @Francky033
          so that means you are using QGLWidget or QML?

          --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
          If you have a question please use the forum so others can benefit from the solution in the future

          1 Reply Last reply
          0
          • F Offline
            F Offline
            Francky033
            wrote on last edited by
            #5

            I'm using a QOpenGLWidget...

            1 Reply Last reply
            0
            • mrjjM Offline
              mrjjM Offline
              mrjj
              Lifetime Qt Champion
              wrote on last edited by
              #6

              Hi
              Not into openGl so much but i wondering if
              8bit openGl means palette based ?
              (256 colors available)
              In that case gradients will look awful. :)

              what are you using 8bit ?
              (for retro look games, normally you would alter the assets to
              use a common 256 color palette and then just render that)

              1 Reply Last reply
              0
              • F Offline
                F Offline
                Francky033
                wrote on last edited by
                #7

                No, I'm talking about 8 bits for each color channel i. e. for each pixel channel r, g, b, a (8x4 = 32 bits)
                Use Bayer's matrix maybe?
                http://www.anisopteragames.com/how-to-fix-color-banding-with-dithering/

                mrjjM 1 Reply Last reply
                0
                • F Francky033

                  No, I'm talking about 8 bits for each color channel i. e. for each pixel channel r, g, b, a (8x4 = 32 bits)
                  Use Bayer's matrix maybe?
                  http://www.anisopteragames.com/how-to-fix-color-banding-with-dithering/

                  mrjjM Offline
                  mrjjM Offline
                  mrjj
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  @Francky033
                  Ah, that way. The BM methods sounds worth trying at least to see how
                  big effect it will have.

                  1 Reply Last reply
                  0

                  • Login

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • Users
                  • Groups
                  • Search
                  • Get Qt Extensions
                  • Unsolved