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

Problems with small FBO sizes in shader sources

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.0.0
    • 5.0.0
    • Quick: SceneGraph
    • None
    • Mac OS - Snow Leopard
    • 326ed5767e5d09ed3bf2177d5de17d4e07edf226

    Description

      When using shaders on a MacBook Pro, I get graphics corruption when texture size on my shaders is below 33 pixels.
      I can only seem to work around this by enforcing a minimum texture Size in my shader source.

      import QtQuick 2.0
      
      Item
      {
          width: 600
          height: 400
      
          Rectangle {
              width: 10
              height: 10
              id: rect
              gradient: Gradient {
                  GradientStop { position: 0; color: "white" }
                  GradientStop { position: 1; color: "black" }
              }
          }
      
          ShaderEffectSource {
              id: shaderSource
              sourceItem: rect
              textureSize: "32x32"
          }
      
          ShaderEffectItem {
              width: 100
              height: 100
              x: 50
              y: 50
              property variant source: shaderSource
      
              fragmentShader: "
              uniform lowp sampler2D source;
              varying highp vec2 qt_TexCoord0;
              void main() {
                  gl_FragColor = texture2D(source, qt_TexCoord0) * vec4(1, 0, 0, 1);
              }
              "
          }
      
      }
      

      Attachments

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

        Activity

          People

            kkalland Kim Motoyoshi Kalland (Inactive)
            bachewii Jens
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes