blob: f6f1847d4d5ed14d7111fcab53a4363ec0932ad0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
.. _pyside6-qsb:
pyside6-qsb
===========
``pyside6-qsb`` is a tool that wraps the `qsb <QSB Manual>`_ tool. qsb is a
command line tool provided by the `Qt Shader Tools`_ module. It integrates
third-party libraries such as `glslang`_ and `SPIRV-Cross`_, optionally invokes
external tools, such as ``fxc`` or ``spirv-opt``, and generates .qsb files.
Additionally, it can be used to inspect the contents of a .qsb package.
For more information on how to use this tool, read Qt's documentation
here: `QSB Manual`_.
Usage
-----
To create a qsb file from a shader file, e.g., ``shader.frag``, use the
following command:
.. code-block:: bash
pyside6-qsb -o shader.frag.qsb shader.frag
To inspect the file produced, i.e., ``shader.frag.qsb``, use the following
command:
.. code-block:: bash
pyside6-qsb -d shader.frag.qsb
This will print the reflection metadata (in JSON form) and the included shaders.
For other modes of operation, refer to the `QSB Manual`_.
.. _`glslang`: https://github.com/KhronosGroup/glslang
.. _`spirv-cross`: https://github.com/KhronosGroup/SPIRV-Cross
.. _`QSB Manual`: https://doc.qt.io/qt-6/qtshadertools-qsb.html
.. _`Qt Shader Tools`: https://doc.qt.io/qt-6/qtshadertools-index.html
|