Uploaded image for project: 'Qt for Python'
  1. Qt for Python
  2. PYSIDE-2816

OpenGL error when using Qt3DExtras.QText2DEntity

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • Not Evaluated
    • None
    • 6.7.2
    • PySide
    • None
    • Linux Fedora 40
      Gnome
      Wayland
      Pyside6 6.7.2
      Python 3.12
    • Linux/Wayland

    Description

      I'm using Pyside6 6.7.2 on Linux (Fedora 40) installed using pip. I'm doing some testings with `Qt3DExtras.QText2DEntity`. Attached on this bug report there a simple test I'm using. On Macos (Arm M1) this test in running OK, without problems. But on Linux I'm having problems. This is output error:

       

      ❯ python test_text_entity.py
      Qt3D.Renderer.RHI.Backend: Initializing RHI with OpenGL backend
      Failed to compile shader: 0(37) : error C7532: global variable gl_FragDepth requires "#version 300" or later
      0(37) : error C0000: ... or #extension GL_NV_fragdepth : enableSource was:
      #version 100
      #extension GL_OES_standard_derivatives : require
      precision highp float;
      precision highp int;struct qt3d_custom_uniforms
      {
          float minAlpha;
          float maxAlpha;
          float _textureSize;
          vec4 color;
      };uniform qt3d_custom_uniforms _24;uniform highp sampler2D distanceFieldTexture;varying vec2 texCoord;
      varying float zValue;void main()
      {
          vec2 texelDeltaX = abs(dFdx(texCoord));
          vec2 texelDeltaY = abs(dFdy(texCoord));
          float avgTexelDelta = (_24._textureSize * 0.5) * (((texelDeltaX.x + texelDeltaX.y) + texelDeltaY.x) + texelDeltaY.y);
          float texScale = 1.0 / avgTexelDelta;
          float devScaleMin = 0.0;
          float devScaleMax = 0.1500000059604644775390625;
          float scaled = (clamp(texScale, devScaleMin, devScaleMax) - devScaleMin) / (devScaleMax - devScaleMin);
          float base = 0.5;
          float threshold = base * scaled;
          float range = 0.0599999986588954925537109375 / texScale;
          float minAlpha = threshold - range;
          float maxAlpha = threshold + range;
          float distVal = texture2D(distanceFieldTexture, texCoord).x;
          gl_FragData[0] = vec4(_24.color.xyz, _24.color.w * smoothstep(minAlpha, maxAlpha, distVal));
          gl_FragDepth = gl_FragCoord.z - (zValue * 9.9999999747524270787835121154785e-07);
      }
      Qt3D.Renderer.RHI.Backend: Failed to build graphics pipeline: Creation Failed
      

      My GPU is a Nvidia 4070 (Driver Version: 555.58.02) on Wayland.

      Attachments

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

        Activity

          People

            crmaurei Cristian Maureira-Fredes
            manuelo Thiago Moraes
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes