MATC(1)

🌸 MATC(1) β€” the user command manual, bestie edition 🌸

okay so you opened the manual for matc, section 1 (that's "user commands" for the uninitiated ✨). this is your girl's full glow-up of the page, every single flag intact, no cap. let's get into it πŸ’…


✨ NAME ✨

matc β€” filament material tools πŸŽ€


πŸ’– DESCRIPTION πŸ’–

okay so matc is a command-line tool that compiles material definitions. that's the whole vibe. the way you call it:

matc [options] <input-file>

πŸ¦‹ Supported input formats:

  • Filament material definition β€” the .mat file πŸ“

πŸ‘‘ OPTIONS πŸ‘‘

the moment you've all been waiting for. every flag, every letter, nothing skipped, periodt ✨

  • --help, -h β€” prints this message πŸ’¬ (yes, the one you're reading, iconic)
  • --license β€” prints the copyright and license info, the legal slay πŸ“œ
  • --output, -o β€” tells it where to put the output file, specify the path bestie πŸŽ€
  • --platform, -p β€” which shader family to generate: desktop, mobile, or all (that's the default πŸ‘‘)
  • --optimize-size, -S β€” optimizes the generated shader code for size instead of just performance. tiny and cute 🧚
  • --api, -a β€” which target API you want: opengl (default ✨), vulkan, metal, or all. you can repeat this flag to hand-pick APIs one by one for inclusion, like so:
matc --api opengl --api metal ...
  • --define, -D β€” adds a preprocessor define macro using <macro>=<value>. if you omit <value> it just defaults to 1 🫢. repeat it as many times as you want for multiple definitions:
matc -Dfoo=1 -Dbar -Dbuzz=100 ...
  • --reflect, -r β€” reflects the specified metadata as JSON: parameters πŸͺž
  • --variant-filter=<filter>, -V <filter> β€” filters out the comma-separated variants you name, and the list of them is: directionalLighting, dynamicLighting, shadowReceiver, skinning, vsm, fog. heads up: this variant filter gets merged with the filter from the material, if the material has one 🀝
  • --version, -v β€” prints the material version number πŸ”’

πŸ™ˆ Internal use and debugging only:

these are the backstage passes, bestie. internal + debugging only, so don't come for me if you break something πŸ’€
  • --optimize-none, -g β€” disables all shader optimizations, purely for debugging πŸ›‘
  • --preprocessor-only, -E β€” optimizes shaders by running only the preprocessor, nothing else πŸ’«
  • --raw, -w β€” compiles a raw GLSL shader into a SPIRV binary chunk 🧊
  • --output-format, -f β€” picks the output format: blob (the default πŸ’œ) or header
  • --debug, -d β€” generates extra data for debugging πŸ”
  • --print, -t β€” prints the generated shaders so you can peek at them, debugging vibes only πŸ‘€

and that's the whole page, no notes. this was matc version 10, dated October 2021 πŸŽ€ β€” mwah, go compile something gorgeous, ily bestie πŸ’–βœ¨