Qt Shader Tools

The Qt Shader Tools module builds on the SPIR-V Open Source Ecosystem as described at the Khronos SPIR-V web site.

The main components of the Qt shader conditioning system are:

  • the qsb command-line tool
  • CMake integration for the qsb tool
  • QShader (part of the QtGui module)
  • QShaderBaker (part of this module, the library equivalent of the qsb tool)

Articles and Guides

C++ API

QShaderBaker

Compiles a GLSL/Vulkan shader into SPIR-V, translates into other shading languages, and gathers reflection metadata

Note: Applications and libraries should avoid using the C++ API directly, unless they have a good reason to do so. Rather, prefer relying on offline pre-processing by invoking the qsb command-line tool at build time via CMake, or manually if invoking via CMake is not feasible. The qsb tool uses QShaderBaker and writes the serialized version of the generated QShader into a file. The usage of the C++ API should be restricted to cases where run time processing and translation cannot be avoided, and the performance implications are understood. An example of this are applications that work with user-provided or dynamically generated shader source strings.

Licenses and Attributions

Qt Shader Tools runtime library is available under commercial licenses from The Qt Company. In addition, it is available under free software licenses. Since Qt 6.3, these free software licenses are GNU Lesser General Public License, version 3, or the GNU General Public License, version 2.

The qsb command-line tool is available under commercial licenses from The Qt Company. In addition, it is available under the GNU General Public License, version 3.

See Qt Licensing for further details.

Furthermore, Qt Shader Tools in 6.8.0 may contain third party modules under following permissive licenses:

SPIRV-Cross, version 2d990d355a296ae1e368585810f884ebadcc4773

Apache License 2.0 and MIT Khronos - old variant

glslang, version 14.2.0

BSD 3-Clause "New" or "Revised" License, and MIT Khronos - old variant, and Apache License 2.0, and GNU General Public License v3.0 or later with Bison exception 2.2, and AML glslang variant License