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

Qt 6 version of MultiEffect



    • Task
    • Resolution: Fixed
    • P2: Important
    • None
    • None
    • None


      https://marketplace.qt.io/products/qt-quick-multieffect is only compatible with Qt 5.15.

      It should be possible to create a Qt 6 version with a number of fairly straightforward changes, while keeping the entire QML API as-is, changing only the underlying details.

      Key points:

      • Have a simple, static path for cases when only a single effect is applied.
        • "static" refers to the way we typically implement shader effects in Qt 6: have the static shader code in a separate file, run it through qsb either offline or at build time (if using CMake), and bundle and reference the .qsb files at run time.
        • For example, if an application adds a drop shadow effect for an item tree, but is not interested in combining the shadow with other effects, then generating shader source code dynamically in JavaScript is a waste of time.
      • When effects are stacked, we need dynamic shader code generation. (there can be potential solutions to avoid this, just like Qt Quick 3D tries to offer a solution of pregenerating shaders for materials of a given scene, but that is out of scope for this task)
        • The shader code should ideally be generated in C++ not in JavaScript. This is useful both for performance and also because one anyway needs to feed the generated shader string into the shadertools C++ APIs.
        • This involves pulling in the qtshadertools module as a dependency. May want to investigate if/how that dependency could be made optional, allowing users on embedded platforms disable it (which would imply disabling support for effect stacking in such builds)
      • The "module" on Marketplace is not a Qt module at all, rather just some code one can place into one's own applications. This is not quite ideal, so convert it into a standalone, proper Qt module.
        • Other similar components on the Marketplace, such as the TreeView, are proper Qt modules already, although with support for qmake only.
        • As we are focusing on Qt 6 here, the module should include both CMake and qmake project files.
      • Revisit what examples and tests are included.
        • It can be helpful to have some simple visual autotests, to provide basic protection against regressions. (which is also expected from a professional product)
      • We should get a more thorough overview of how the effect implementations compare to Qt Graphical Effects.
        • For example, if one applies a drop shadow via MultiEffect, how does the shader code under the hood compare to GraphicalEffects' shadow implementations (of which in Qt 5 there are two)?
        • Testing on some typical embedded devices won't hurt.


        Issue Links

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



              kagro Kaj Grönholm
              lagocs Laszlo Agocs
              5 Vote for this issue
              16 Start watching this issue



                Gerrit Reviews

                  There are no open Gerrit changes