Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
6.7
-
None
-
ee975a136 (dev), 0666759d4 (6.7), 4bffe40db (tqtc/lts-6.5)
Description
Note: This is only potential issue when using QQuickShaderEffect from private C++ API, not from QML like ShaderEffects are normally used.
See the attached example.
Expected behavior: Item is first yellow and after 2 seconds turns green.
Actual behavior: Item is first red and after 2 seconds turns green.
Explanation:
QQuickShaderEffect maps the dynamic properties as uniforms into shader. Currently it is possible to set properties before componentComplete() and then after the initial QQuickShaderEffect handleUpdatePaintNode, but not in between. With the attached example this delay is ~300ms on my PC. This causes issues QTBUG-122340 and QTBUG-122746 with the MultiEffect as layouting the item changes shader properties, but potentially affects also other private API users.
Should this work or is it misuse of the API? Should/could shaders be initialized only after the initial updatePaintNode()?