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

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

    Details

    • Type: Bug
    • Status: Reported
    • Priority: P2: Important
    • Resolution: Unresolved
    • Affects Version/s: 5.11.0
    • Fix Version/s: None
    • Component/s: GUI: Text handling
    • Labels:
      None
    • Environment:
      KDE neon using Qt 5.11.0

      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

              • Assignee:
                esabraha Eskil Abrahamsen Blomfeldt
                Reporter:
                broulik Kai Uwe Broulik
              • Votes:
                2 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Gerrit Reviews

                  There are no open Gerrit changes