Important: Please read the Qt Code of Conduct -

Pass ARGB32 (not Premultiplied) image data to a ShaderEffect?

  • Hi,

    In QtQuick 2.0 is there any way to pass raw image data to a ShaderEffect?

    I've stored some 4 colour distance fields in RGBA PNG files. I'm not using the Alpha channel for alpha but for a 4th monochrome distance field. I've run into problems because the RGB data is premultiplied by the alpha channel, corrupting all the data. Is there any way to turn this off?

    All my work is in QML run using qmlscene.

    On the ShaderEffectSource I've tried setting 'format: ShaderEffectSource.RGBA' but this didn't effect anything - I think it's the default(premultiplied). I would like the current format renamed to ShaderEffectSource.RGBA_Premultiplied and a raw RGBA format added.

    If there is any way to work around this, please let me know.

Log in to reply