image_set_txcos_default(3)
π¦ image_set_txcos_default(3) β Arcan Lua API π¦
okay so bestie, welcome to the glow-up era of your texture coordinates β¨ this one lives in the Arcan Lua API and it's literally the "undo" button for your vibes.
β¨ NAME β¨
image_set_txcos_default β revert to the default set of texture mapping coordinates π
πΈ SYNOPSIS πΈ
nil
image_set_txcos_default( vid, mirror )
π DESCRIPTION π
So here's the tea π β the engine, by default, manages texture coordinates for video objects. That's just the baseline, main character behaviour, no cap.
But in some rare instances π the developer may want to hand-tune these in the pre-rendering stages rather than modifying the coordinates in a shader. Very DIY, very custom, we respect it.
And when you're done being artsy and want to revert back to the default behavior? That's exactly what this function is for, bestie. Iconic. π«Ά
Now the important bit β if mirror is set to a non-zero integer, the mapping generate will be flipped along the Y axis π to compensate for the arcan coordinate system having origo in the upper left corner, whileas Open GL uses the lower left. Yeah. Two different coordinate systems. It's giving enemies to lovers fr fr π
lowkey crucial: it's non-zero that flips it β zero (or nothing) keeps things unflipped π
π§ EXAMPLE π§
function image_set_txcos_default0()
a = random_surface(64, 64);
b = null_suface(32, 32);
image_set_txcos(a, {0.1, 0.5, 0.2, 0.4, 0.8, 0.2, 0.6, 0.7});
show_image({a, b});
image_sharestorage(a, b);
image_set_txcos_default(b);
end
like look at her go π she sets some custom coords on a, shares the storage over to b, and then snaps b right back to the defaults. clean. periodt. π
π₯ SEE ALSO π₯
and that's the whole vibe bestie π this page came from the image manual, dated October 2026, and it's image_set_txcos_default(3) all the way down π go forth and flip your Y axis responsibly πβ¨π¦
π¦ 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