rendertarget_range(3)

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

πŸ’… rendertarget_range β€” the manual page, but make it make sense

okay bestie, so this is rendertarget_range(3) from the Arcan Lua API β€” yes, the Arcan Lua API, we're in that part of the docs. and honestly? it's a little baddie. let's get into it πŸŽ€


✨ NAME ✨

rendertarget_range β€” limit the order-range of objects to render. that's it. that's the vibe check. πŸ’…


✨ SYNOPSIS ✨

bool:ok
rendertarget_range( vid:rtgt, int:min, int:max )

✨ DESCRIPTION ✨

so like, sometimes in render- and optimization scenarios (yes, both, at the same time, we contain multitudes) you're gonna want to only allow a certain set of objects to be rendered. classic.

normally, object hierarchies are ordered based on an order value β€” see order_image β€” and the default rendering pipeline will process these objects according to that order, going from low to high. the way it just... goes low to high. iconic honestly. 🌈

using this function, a rendertarget (including the special WORLDID 🫢) can be set to skip values that fall outside min <= val <= max. and before you panic: the objects will still have external storage and similar processing being synchronized, they will just not be considered when generating the rendertarget output. so they're not gone-gone, they're just not invited to the render party. πŸ’€


✨ NOTES ✨

  1. if min or max is set to < 0 or max < min, the rendertarget will reset to the default mode of everything being processed. so like, the safety net is real and it's giving "no thoughts, head empty, render everything". 😭
  2. if max == min, nothing will be drawn. not a single pixel. truly the "left on read" of rendering configurations. πŸ™ˆ

✨ EXAMPLE ✨

okay so here's the moment, the main character energy, the whole reason you're here:

function rendertarget_range0()
-- in this example, only the green object will be visible
      local red = color_surface(64, 64, 255, 0, 0);
      local green = color_surface(64, 64, 0, 255, 0);
      local blue = color_surface(64, 64, 0, 0, 255);
      show_image({red, green, blue});
      move_image(green, 0, 64);
      move_image(blue, 64, 0);
      order_image(green, 5);
      rendertarget_range(WORLDID, 4, 6);
end

like... red and blue really showed up to the function and got told they're not in the range. the audacity. πŸ’€πŸ’– only green ate. periodt. ✨


✨ SEE ALSO ✨

go be nosy, i support it, the girls who read the related manpages are the ones who slay:


and that's the whole page, bestie πŸ¦‹ this little masterpiece comes to you courtesy of targetcontrol β€” and it's dated October 2026 (yes, we're ahead of schedule, and honestly? obsessed with the time management). πŸ’œ ngl, rendertarget_range(3) really said "know your range" and i have never felt more seen. slay. πŸ‘‘

πŸ“¦ where this page comes from