mesh_shader(3)

πŸ“¦
version 0.7.1 Β· 2 versions
, in nixos 26.05

πŸ’… 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