rendertarget_id(3)
π NAME π
okay so bestie, welcome to rendertarget_id(3) from the Arcan Lua API β¨ β the function that assigns a numeric identifier to a rendertarget. That's it, that's the gig. π
π¦ SYNOPSIS π¦
id or nil
rendertarget_id( vid:rtgt )
rendertarget_id( vid:rtgt, int:id )
π DESCRIPTION π
This one is intended for rendering cases where a shader needs to distinguish between the destination rendertarget. The example the page gives is stereoscopically rendering a side-by-side packed textured source without manually managing multiple pipelines. Iconic, honestly. π
So what do you do? Create two rendertargets β one via define_rendertarget and the other via define_linktarget β then give each one a unique identifier with the help of this function, rendertarget_id. After that, write your shader so it does the distinction via the builtin int uniform rtgt_id. Periodt. π
There are two forms of this function, and they're exactly what they sound like: one retrieves the current identifier, and the other updates it. If the vid specified with rtgt does not exist, nil will be returned. No cap, that's the rule. π
π SEE ALSO π
targetcontrol
that's the page, bestie π«Ά β source/version: Arcan Lua API, date: October 2026, and the star of the show is rendertarget_id(3). mwah π
π¦ 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