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

some qt3d example's GUI in Qt6 doesn't look right when compared with Qt5 with some shader error

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 6.2.2, 6.2.3, 6.3.0 Beta1
    • Qt3D
    • None
    • we run it under nxp imx platform using bsp 5.15.
    • Linux/Yocto

    Description

      when updating our qt from qt5 to qt6,  quite some examples like 3d-text, basicshapes-cpp, 

      controls, multiviewport, scene3d, simple.cpp, simple-qml, 

      we get shader built error:

      (6:0) : error : 'attribute' is only for the vertex shaders
      (7:0) : error : 'attribute' is only for the vertex shaders

          • Problematic Fragment shader source code ***
            #version 100
            #ifdef GL_KHR_blend_equation_advanced
            #extension GL_ARB_fragment_coord_conventions : enable
            #extension GL_KHR_blend_equation_advanced : enable
            #endif
            #ifndef GL_FRAGMENT_PRECISION_HIGH
            #define highp mediump
            #endif
            #line 1

                              #define LAYER_diffuse
                              #define LAYER_specular
                              #define LAYER_normal
                              uniform highp vec3 eyePosition;
                              attribute highp vec3 worldPosition;
                              attribute highp vec3 worldNormal;

      I search the qt3d code, I cannot find any shader with these lines in src/extras/shaders,

      And it is using gles1 shader which seems unreasonable.

      why attribute is in fragment shader?

      I can run the sample, but GUI seems not right,  some widgets are missing compared with the same sample in Qt5. 

       

      Can you explain how shader is generated for each qt3d examples? These examples are running well in qt5.  Are there something we need to add when building and installing these samples?

       

      Thanks.

       

      Attachments

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

        Activity

          People

            seanharmer Sean Harmer
            chingling chingling wang
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes