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

ShaderEffect uniform values are not set from vector2d and quaternion.

    XMLWordPrintable

Details

    • d311e1bdfc756e2db9a9b9e4c1269da709e5090a cd0f3fba787aab1b153e5dcba281a241f30b7e59

    Description

      Uniform values are not updated from those properties:

      ShaderEffect 
      {
         property var v1: Qt.vector2d(1.0,1.0)
         property var q1: Qt.quaternion(1.0,1.0)
         property vector2d v2: Qt.vector2d(1.0,1.0)
         property quaternion q2: Qt.quaternion(1.0,1.0)
      
         fragmentShader: "
              uniform vec2 v1;
              uniform vec2 v2;
              uniform vec4 q1;
              uniform vec4 q2;
         ...
      

      This behavior is really confusing because QVector3D, QVector4D, QMatrix4x4 are handled.

      Quick look into code, and I figure out changes need inside_QQuickCustomMaterialShader::updateState_ method.
      Values QMetaType::QVector2D and QMetaType::QQuaternion should be in switch statement. Default should also rise an error in log, so it will not confuse when using wrong type.

      Attachments

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

        Activity

          People

            sletta Gunnar Sletta
            arpegius Kamil Szczesniak
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes