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

Extensible automatic binding mechanism for QML3D ShaderProgram item

    XMLWordPrintable

Details

    • Task
    • Resolution: Out of scope
    • P2: Important
    • 5.8.0
    • None
    • Qt3D
    • None

    Description

      The automatic uniform bindings in the QML ShaderProgram element should be extensible, enabling users to define their own QML types that bind uniforms in unanticipated ways.

      This mechanism could be used immediately to enable support for cubemaps and 3d textures.

      This task is related to QTBUG-19847 (Cannot assign QImage or QDeclarativeImage as a texture on a shader program) and QTBUG-21840 (Add support for binding cubemaps 3D textures to QML3D ShaderProgram items).

      In practice, this would mean that a properly constructed class would enable the user to simply add an instance of their custom class to a ShaderProgram item, and have it be exposed to the shader programs automatically. e.g.:

      ShaderProgram {
          property variant myCustomUniform: MyCustomUniform {}
      
          vertexShader: " /*...*/ ; uniform TYPE myCustomUniform // TYPE is the approriate GLSL type for the uniform, and is potentially a struct"
      }
      

      Attachments

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

        Activity

          People

            dpope Daniel Pope (closed Nokia identity) (Inactive)
            debhal Julian de Bhal (closed Nokia identity) (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes