Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Qt Shader Tools and LGPL



  • The Qt 6 documentation says, "Qt Shader Tools is available under commercial licenses from The Qt Company. In addition, it is available under the GNU General Public License, version 3."

    I believe the Qt Shader Tools output .qsb files.

    Can the .qsb files generated by the Qt Shader Tools be included in an LGPL project legally?

    I presume not, but I hope I'm wrong!


  • Moderators

    So the shader tools will not take part in compilation of your app, and your users will be able to swap the .qsb files for custom ones at runtime?

    It's an interesting case. As long as .qsb output does not inherit GPLv3 it should be legal. But does it or not? I don't know.

    But this is really a corner case, you should consult some lawyer for a more serious answer. I'm only guessing here!



  • @sierdzio said in Qt Shader Tools and LGPL:

    So the shader tools will not take part in compilation of your app, and your users will be able to swap the .qsb files for custom ones at runtime?

    Yes, that's the idea.

    It's an interesting case. As long as .qsb output does not inherit GPLv3 it should be legal. But does it or not? I don't know.

    I ran qsb on an example fragment shader, there don't appear to be any comments in the generated output about GPL, but I don't know if that's enough.



  • A bit of Googling suggests the output of GPL tools doesn't inherit the GPL.

    In the application the qsb file is then used to initialise a QShader, like so...

    QFile f("MyTexture.frag.qsb");
    if (f.open(QIODevice::ReadOnly))
    {
      QShader s = QShader::fromSerialized(f.readAll());
    }
    

    It sounds like it might be ok.


  • Moderators

    Sounds like it, yes. But this is really out of my expertise to say for sure.



  • @mooglus Could be a Qt leak. Good for you.


Log in to reply