rendertarget_range(3)
π 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 β¨
- if
minormaxis set to< 0ormax < 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". π - 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
- 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