mesh_shader(3)
π mesh_shader β ok so listen, this is the one that swaps your shader
Hey bestie π«Ά welcome to the Arcan Lua API manual, page for mesh_shader(3). Yes we're reading manpages together now, it's called character development β¨
πΈ NAME πΈ
mesh_shader β literally just changes the active shader for a submesh of a model. That's it, that's the whole job, and she does it flawlessly π
β¨ SYNOPSIS β¨
nil
mesh_shader( mesh, shid, slot )
so like, the return value is nil β she gives you nothing back, not even a little crumb π and she takes three things: mesh, shid, slot.
π¦ DESCRIPTION π¦
okay so picture this π every single 3D-model can have a bunch of meshes attached to it β and a "mesh" here is just grouped primitives, no cap. Like little friend groups of polygons π
and each one of those meshes can also have its own custom set of processing instructions, which we call a "shader" β yes, a whole separate glow-up routine per mesh, we love a main character with her own styling team π
this function right here is what you call to associate a prebuilt shader with an individual mesh slot of a 3D model. So:
meshβ the 3D model whose mesh we're messing with πshidβ the prebuilt shader you already have sitting there, ready to slay β¨slotβ the individual mesh slot that's getting this shader, iykyk π
that's the vibe check: you point at a slot, you hand it a prebuilt shader, done. Periodt π«Ά
π SEE ALSO π
go read these next bestie, they're in the same universe fr fr:
ok that's the whole page π§ tysm for reading with me!! this was the 3d section of the Arcan Lua API, dated October 2026 β screenshot it, cite it, frame it, idc π mwah, study date again tomorrow, same time, same terminal πππ¦
π¦ where this page comes from
- nixos 26.05: arcan 0.7.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms