Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-70481

Text vertex shader is incorrect leading to pixelated rendering with non-integer scaling

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.14.0 RC1
    • 5.11.0
    • GUI: Text handling
    • None
    • KDE neon using Qt 5.11.0
    • af090d8073a4352f6a92bbe2d015ae87476684c7 (qt/qtdeclarative/5.14)

    Description

      When using non-integer screen scaling, QtQuick NativeRendering results in blurry or pixelated text. See also QTBUG-67007

      I traced it down to the textmask.vert shader file which tries to align it to the pixel grid by rounding. However, it ends up rounding incorrectly for non-integer dpr values. I am not a shader expert so I cannot tell you what exactly went wrong, I only noticed that not rounding and dividing by dpr "fixes" the issue but will re-introduce a bug that was fixed by doing this.

      The offending line is

      gl_Position = matrix * floor(vCoord * dpr + 0.5) / dpr;
      

      introduced in 6e883c535b91c55289d54aa639199ca0a4decaec

      The same issue is present in the outlinedtext.vert (where it was forgotten in C++ code to set the dpr uniform but this is a separate issue )

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              vgt Eirik Aavitsland
              broulik Kai Uwe Broulik
              Votes:
              3 Vote for this issue
              Watchers:
              11 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes