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

Error messages when using QML DropShadow with RHI Metal backend

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • Not Evaluated
    • None
    • 5.15.1
    • None
    • Host: Mac Mini (2019), MacOS 10.15.7 (Catalina), Qt 5.15.1
      Device: iPad Pro (2020), iOS 14.1
    • iOS/tvOS/watchOS

    Description

      When choosing RHI with Metal backend we get lots of these Errors on the log when using QML DropShadow:

      ShaderEffect: shader preparation failed for uniform highp sampler2D source;
      uniform lowp float qt_Opacity;
      uniform mediump float spread;
      uniform highp vec2 dirstep;
      uniform lowp vec4 color;
      uniform lowp float thickness;
      
      varying highp vec2 qt_TexCoord0;
      
      void main() {
          mediump float result = 0.0;
          highp vec2 pixelStep = dirstep * spread;
          result += float(0.292213) * texture2D(source, qt_TexCoord0 + pixelStep * float(-8)).a;
          result += float(0.389876) * texture2D(source, qt_TexCoord0 + pixelStep * float(-7)).a;
          result += float(0.50056) * texture2D(source, qt_TexCoord0 + pixelStep * float(-6)).a;
          result += float(0.618428) * texture2D(source, qt_TexCoord0 + pixelStep * float(-5)).a;
          result += float(0.735233) * texture2D(source, qt_TexCoord0 + pixelStep * float(-4)).a;
          result += float(0.841132) * texture2D(source, qt_TexCoord0 + pixelStep * float(-3)).a;
          result += float(0.92599) * texture2D(source, qt_TexCoord0 + pixelStep * float(-2)).a;
          result += float(0.980961) * texture2D(source, qt_TexCoord0 + pixelStep * float(-1)).a;
          result += float(1) * texture2D(source, qt_TexCoord0 + pixelStep * float(0)).a;
          result += float(0.980961) * texture2D(source, qt_TexCoord0 + pixelStep * float(1)).a;
          result += float(0.92599) * texture2D(source, qt_TexCoord0 + pixelStep * float(2)).a;
          result += float(0.841132) * texture2D(source, qt_TexCoord0 + pixelStep * float(3)).a;
          result += float(0.735233) * texture2D(source, qt_TexCoord0 + pixelStep * float(4)).a;
          result += float(0.618428) * texture2D(source, qt_TexCoord0 + pixelStep * float(5)).a;
          result += float(0.50056) * texture2D(source, qt_TexCoord0 + pixelStep * float(6)).a;
          result += float(0.389876) * texture2D(source, qt_TexCoord0 + pixelStep * float(7)).a;
          result += float(0.292213) * texture2D(source, qt_TexCoord0 + pixelStep * float(8)).a;
          const mediump float wSum = float(11.5688);
          gl_FragColor = mix(vec4(0), color, clamp((result / wSum) / thickness, 0.0, 1.0)) * qt_Opacity;
      }
      rhi shader effect only supports files (qrc or local) at the moment
      

      Attachments

        Issue Links

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

          Activity

            People

              qt.team.graphics.and.multimedia Qt Graphics Team
              xxtrawurst Rafael Spring
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes