MATINFO(1)

okay bestie, sit down, hydrate, and let me tell you about matinfo β€” it lives in section 1 of the User Commands manual, so it's a user-facing command, not some dusty kernel thing. πŸ’…


🌸 NAME 🌸

matinfo β€” filament material tools 🧡✨


πŸ’– DESCRIPTION πŸ’–

matinfo prints information about material files compiled with matc. that's the whole vibe. it peeks inside your compiled material and tells you what's in there. 🫢

Usage:

matinfo [options] <material file>

✨ OPTIONS ✨

  • --help, -h β€” prints this message. classic. the "help me bestie" button. πŸ™ˆ
  • --print-glsl=[index], -g β€” prints GLSL for the nth shader. and listen: 0 is the first OpenGL shader, so we count from zero around here, no cap. πŸ”₯
  • --print-spirv=[index], -s β€” validates and prints disasm for the nth shader. 0 is the first Vulkan shader. it checks it AND spills the tea in disasm form. πŸ’€
  • --print-metal=[index], -m β€” prints Metal Shading Language for the nth shader, and yep, 0 is the first Metal shader. πŸ“
  • --print-vkglsl=[index], -v β€” prints the nth Vulkan shader, but transpiled into GLSL. it's giving translator era. 🌈
  • --print-dic-glsl β€” prints the GLSL dictionary. yes it's spelled "dic", we don't make the rules. πŸ“–
  • --print-dic-metal β€” prints the Metal dictionary. πŸ“–
  • --print-dic-vk β€” prints the Vulkan dictionary. πŸ“–
  • --web-server=[port], -w β€” serves a web page at the given port (e.g. 8080). main character energy, honestly. πŸ‘‘
  • --dump-binary=[index], -b β€” dumps binary SPIRV for the nth Vulkan shader to out.spv. it literally writes that file, watch for it. πŸ’Ύ
  • --license β€” prints copyright and license information. respect the elders. πŸŽ€
  • --analyze-spirv=[index], -a β€” prints annotated GLSL for the nth shader, and again, 0 is the first Vulkan shader. annotated!! it's like sparknotes but for shaders. ⭐

πŸŒ€ Usage: πŸŒ€

okay so. and THEN the page goes and says the entire thing over again, and I am not skipping it, because everything on this page matters. here we go, round two, same energy:

matinfo [options] <material file>
  • --help, -h β€” prints this message. yes, again. consistency queen. πŸ’…
  • --print-glsl=[index], -g β€” prints GLSL for the nth shader, 0 is the first OpenGL shader. πŸ”₯
  • --print-spirv=[index], -s β€” validates and prints disasm for the nth shader, 0 is the first Vulkan shader. πŸ’€
  • --print-metal=[index], -m β€” prints Metal Shading Language for the nth shader, 0 is the first Metal shader. πŸ“
  • --print-vkglsl=[index], -v β€” prints the nth Vulkan shader transpiled into GLSL. 🌈
  • --print-dic-glsl β€” prints the GLSL dictionary. πŸ“–
  • --print-dic-metal β€” prints the Metal dictionary. πŸ“–
  • --print-dic-vk β€” prints the Vulkan dictionary. πŸ“–
  • --web-server=[port], -w β€” serves a web page at the given port (e.g. 8080). πŸ‘‘
  • --dump-binary=[index], -b β€” dumps binary SPIRV for the nth Vulkan shader to out.spv. πŸ’Ύ
  • --license β€” prints copyright and license information. πŸŽ€
  • --analyze-spirv=[index], -a β€” prints annotated GLSL for the nth shader, 0 is the first Vulkan shader. ⭐

ngl bestie, every single index in this page is zero-based. if you pass 0 you get the first shader, and that is not a vibe check you want to fail. 🫢

and that's the whole page, periodt. πŸ¦‹ this one's dated October 2021, and it signs off as MATINFO(1) β€” so if you remember nothing else, remember the name and the manual section. mwah. πŸ’–πŸŽ€βœ¨