PYSIDE6-QSB(1)

πŸ“¦
version 6.11.2 Β· 2 versions
, in ubuntu stonking

πŸ’– NAME πŸ’–

pyside6-qsb β€” this is the tool, and its actual call-me-by name is qsb ✨ (it lives in the PySide6 tools manual, if you were wondering where it hangs out)


🌸 SYNOPSIS 🌸

qsb [options] file

πŸ¦‹ DESCRIPTION πŸ¦‹

Qt Shader Baker, bestie β€” and specifically the one using QShader from Qt 6.11.2 πŸ’…

That's it, that's the whole pitch: you feed it a shader, it bakes it. Very demure, very mindful, extremely useful. 🧚


✨ OPTIONS ✨

Ok so here's the full menu, no skips, no skimming, we're doing all of them 🫢

  • -h, --help β€” shows you the help for the commandline options. Your "what do I even do here" button 🌈
  • --help-all β€” same help energy, but it also drags in all the generic Qt options too. The extended cut πŸ’€
  • -v, --version β€” tells you the version info ✨
  • -b, --batchable β€” also generates a rewritten vertex shader for Qt Quick scene graph batching. Two shaders for the price of one, slay πŸŽ€
  • --zorder-loc <location> β€” the extra vertex input location used when rewriting for batching. Defaults to 7 ⭐
  • --glsl <versions> β€” comma separated list of GLSL versions to generate. Example given is literally "100 es,120,330" so like, that's the format bestie πŸ‘‘
  • --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 the commonly-used one for shaders in Qt Quick materials and effects. The default-ish starter pack fr fr ✨
  • --msltess β€” says "hey, this vertex shader is going into a pipeline with tessellation". It's mandatory for vertex shaders that are planned to be used with tessellation when you're targeting Metal (--msl) 🌸
  • --tess-vertex-count <count> β€” the output vertex count from the tessellation control stage. Mandatory for tessellation evaluation shaders planned for use with Metal. The default value is 3. And heads up: if it doesn't match the tess.control stage, the generated MSL code will not function as expected πŸ’€ not a drill
  • --tess-mode <mode> β€” the tessellation mode: triangles or quads. Mandatory for tessellation control shaders planned for use with Metal. Default value is triangles. Isolines are not supported with Metal. And same warning as above: if it doesn't 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). Only set it for vertex shaders that really do rely on multiview, because the resulting asset is tied to num_views. It can be set for fragment shaders too, so you get QSHADER_VIEW_COUNT auto-defined (which is useful for ensuring uniform buffer layouts) πŸ‘‘
  • -g β€” generate full debug info for SPIR-V and DXBC πŸ”₯
  • -O β€” invoke spirv-opt (an external tool, so yes it has to actually exist) to optimize SPIR-V for performance ⚑ (well, no ⚑ emoji in the official vibe list, but you get it β€” speed)
  • -o, --output <filename> β€” output file for the shader pack πŸ’–
  • --orig-file <filename> β€” filename to be used for dependency tracking instead of <file> πŸŽ€
  • --qsbversion <version> β€” the QSB version to use for the output file. By default the latest version is automatically used, so only reach for this when you're baking 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 🌈 (yes, it's the mirror twin of -t)
  • -D, --define <name[=value]> β€” define a macro. This argument can be specified multiple times, stack 'em up πŸŽ€
  • -p, --per-target β€” enable per-target compilation. So instead of source->SPIRV->targets, it does source->SPIRV->target separately for each target πŸ’œ
  • -d, --dump β€” switches to dump mode. The input file is expected to be a shader pack in this mode πŸ‘€
  • -x, --extract <what> β€” switches to extract mode. Input file is expected to be a shader pack. The result gets written to the output specified by -o. Pass -b to choose the batchable variant. And <what>=reflect|spirv,<version>|glsl,<version>|... ✨
  • -r, --replace <what> β€” switches to replace mode. Replaces the specified shader inside the shader pack with the contents of a file. This argument can be specified multiple times. Pass -b to choose the batchable variant. It also supports adding a shader for a target/variant that wasn't present before. Format: <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 get printed. Quiet luxury, no cap 🀫
  • --mediump β€” default to medium precision for floats in fragment shaders instead of high. GLSL ES only; it's ignored for everything else, including GLSL πŸ™ˆ
  • --depfile <depfile> β€” enables generating the depfile for the input shaders, using the #include statements 🧚

πŸŽ€ Arguments πŸŽ€

  • file β€” the Vulkan GLSL source file to compile. The file extension determines the shader stage, and it can be one of .vert, .tesc, .tese, .geom, .frag, .comp ⭐
Ok important notes, bestie, read this part: - 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. For example, MSL tessellation will likely need --msltess, --tess-vertex-count, --tess-mode, depending on the stage. - Geometry shaders are not supported with Metal. Periodt.

πŸ’œ Sign-off πŸ’œ

That's the whole page, you ate it πŸ‘‘ This is pyside6-qsb version 6.11, dated September 2026, and the manual name up top was PYSIDE6-QSB(1) from the PySide6 tools set. Go bake something iconic 🌈🫢

πŸ“¦ where this page comes from