PYSIDE6-QSB(1)

NAME
pyside6-qsb - qsb

SYNOPSIS
qsb [options] file

DESCRIPTION
Qt Shader Baker (using QShader from Qt 6.10.2)

OPTIONS

-h, --help
    Displays help on commandline options.

--help-all
    Displays help, including generic Qt options.

-v, --version
    Displays version information.

-b, --batchable
    Also generates rewritten vertex shader for Qt Quick scene graph batching.

--zorder-loc <location>
    The extra vertex input location when rewriting for batching. Defaults to 7.

--glsl <versions>
    Comma separated list of GLSL versions to generate. (for example, "100 es,120,330")

--hlsl <versions>
    Comma separated list of HLSL (Shader Model) versions to generate. F.ex. 50 is 5.0, 51 is 5.1.

--msl <versions>
    Comma separated list of Metal Shading Language versions to generate. F.ex. 12 is 1.2, 20 is 2.0.

--qt6
    Equivalent to --glsl "100 es,120,150" --hlsl 50 --msl 12. This set is commonly used with shaders for Qt Quick materials and effects.

--msltess
    Indicates that a vertex shader is going to be used in a pipeline with tessellation. Mandatory for vertex shaders planned to be used with tessellation when targeting Metal (--msl).

--tess-vertex-count <count>
    The output vertex count from the tessellation control stage. Mandatory for tessellation evaluation shaders planned to be used with Metal. The default value is 3. If it does not match the tess.control stage, the generated MSL code will not function as expected.

--tess-mode <mode>
    The tessellation mode: triangles or quads. Mandatory for tessellation control shaders planned to be used with Metal. The default value is triangles. Isolines are not supported with Metal. If it does not match the tess.evaluation stage, the generated MSL code will not function as expected.

--view-count <num_views>
    The number of views the shader is used with. num_views must be >= 2. Mandatory when multiview rendering is used (gl_ViewIndex). Set only for vertex shaders that really do rely on multiview (as the resulting asset is tied to num_views). Can be set for fragment shaders too, to get QSHADER_VIEW_COUNT auto-defined. (useful for ensuring uniform buffer layouts)

-g  Generate full debug info for SPIR-V and DXBC

-O  Invoke spirv-opt (external tool) to optimize SPIR-V for performance.

-o, --output <filename>
    Output file for the shader pack.

--qsbversion <version>
    QSB version to use for the output file. By default the latest version is automatically used, use only to bake compatibility versions. F.ex. 64 is Qt 6.4.

-c, --fxc
    In combination with --hlsl invokes fxc (SM 5.0/5.1) or dxc (SM 6.0+) to store DXBC or DXIL instead of HLSL.

-t, --metallib
    In combination with --msl builds a Metal library with xcrun metal(lib) and stores that instead of the source. Suitable only when targeting macOS, not iOS.

-T, --metallib-ios
    In combination with --msl builds a Metal library with xcrun metal(lib) and stores that instead of the source. Suitable only when targeting iOS, not macOS.

-D, --define <name[=value]>
    Define macro. This argument can be specified multiple times.

-p, --per-target
    Enable per-target compilation. (instead of source->SPIRV->targets, do source->SPIRV->target separately for each target)

-d, --dump
    Switches to dump mode. Input file is expected to be a shader pack.

-x, --extract <what>
    Switches to extract mode. Input file is expected to be a shader pack. Result is written to the output specified by -o. Pass -b to choose the batchable variant. <what>=reflect|spirv,<version>|glsl,<version>|...

-r, --replace <what>
    Switches to replace mode. Replaces the specified shader in the shader pack with the contents of a file. This argument can be specified multiple times. Pass -b to choose the batchable variant. Also supports adding a shader for a target/variant that was not present before. <what>=<target>,<filename> where <target>=spirv,<version>|glsl,<version>|...

-e, --erase <what>
    Switches to erase mode. Removes the specified shader from the shader pack. Pass -b to choose the batchable variant. <what>=spirv,<version>|glsl,<version>|...

-s, --silent
    Enables silent mode. Only fatal errors will be printed.

--mediump
    Default to medium precision for floats in fragment shaders instead of high. GLSL ES only; ignored for everything else, including GLSL.

--depfile <depfile>
    Enables generating the depfile for the input shaders, using the #include statements.

  Arguments:

file
    Vulkan GLSL source file to compile. The file extension determines the shader stage, and can be one of .vert, .tesc, .tese, .geom, .frag, .comp. Note: Tessellation control/evaluation is not supported with HLSL, instead use -r to inject handcrafted hull/domain shaders. Some targets may need special arguments to be set, e.g. MSL tessellation will likely need --msltess, --tess-vertex-count, --tess-mode, depending on the stage. Geometry shaders are not supported with HLSL and MSL.