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. For compiling into SPIR-V glslang is used, while translating and reflecting is done via SPIRV-Cross.
In order to allow shader code to be written once in Qt applications and libraries, all shaders are expected to be written in a single language which is then compiled into SPIR-V. Versions for various shading language are then generated from that, together with reflection information (inputs, outputs, shader resources). This is then packed into easily and efficiently serializable QRhiShader instances. The Qt Rendering Hardware Interface consumes QRhiShader instances directly.
The two main components are:
- QShaderBaker and the
qsbcommand-line tool, and
- QRhiShader (part of the Qt Rhi module)