[Interest] QtQuick2 image rendering and custom shader overhead

Preet prismatic.project at gmail.com
Mon May 6 19:05:31 CEST 2013

> Using ShaderEffectSource or "Item.layer: true" does mean going through an
> FBO. Using ShaderEffect alone or with a plain Image element can be almost
> the same as using a plain Image element. I say "can" as the content of the
> shader greatly impacts the resulting performance.
> If you do:
> Image {
>     id: theIcon
>     source: "myIcon.png"
>     visible: false
> }
> ShaderEffect {
>     propery variant source: theIcon
>     width: theIcon.width
>     height: theIcon.height
>     fragmentShader: "...."
> }
> There is no FBO involved and the performance will be close to that of
> rendering a normal Image. Image elements can be used directly as texture
> sources, you see. In fact any, QQuickItem that implements the
> QSGTextureProvider interface can be used directly as a texture in a shader
> effect. It is also possible to use ShaderEffect without textures, for
> instance to render a gradient.

 This is great to hear... I took a look through QQuickImage and didn't
think it was exactly trivial to subclass -- there's quite a bit of code and
functionality for it. Thanks to both for the feedback!

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20130506/2b313ecc/attachment.html>

More information about the Interest mailing list