Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Solved Poor graphics / Banding issues

    General and Desktop
    3
    8
    1193
    Loading More Posts
    • 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
      Francky033 last edited by

      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-worx 1 Reply Last reply Reply Quote 0
      • raven-worx
        raven-worx Moderators @Francky033 last edited by

        @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 Reply Quote 0
        • F
          Francky033 last edited by

          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-worx 1 Reply Last reply Reply Quote 0
          • raven-worx
            raven-worx Moderators @Francky033 last edited by

            @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 Reply Quote 0
            • F
              Francky033 last edited by

              I'm using a QOpenGLWidget...

              1 Reply Last reply Reply Quote 0
              • mrjj
                mrjj Lifetime Qt Champion last edited by

                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 Reply Quote 0
                • F
                  Francky033 last edited by

                  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/

                  mrjj 1 Reply Last reply Reply Quote 0
                  • mrjj
                    mrjj Lifetime Qt Champion @Francky033 last edited by

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

                    1 Reply Last reply Reply Quote 0
                    • First post
                      Last post