ABS(3G)
β¨ ABS(3G) β¨
okay bestie, welcome to the ABS page from the <3G> manual section β yes that's the OpenGL shading language corner of the man-verse, and no you don't have to be scared, it's literally just "gimme the absolute value" energy π
πΈ NAME πΈ
abs β return the absolute value of the parameter
π DECLARATION π
here's the three glow-ups of the same function, pick the one that matches your type bestie:
genType abs(genType x);
genIType abs(genIType x);
genDType abs(genDType x);
π¦ PARAMETERS π¦
xβ the value you want the absolute of. hand it over, we're taking the absolute. β¨
π DESCRIPTION π
abs returns the absolute value of x. that's it. that's the whole vibe. no cap, it just eats the minus sign for breakfast and hands you back a non-negative number like the icon it is π
π VERSION SUPPORT π
so here's the tea on which OpenGL Shading Language versions each overload showed up for β because yes, not all of them were invited to the party from day one π
The columns are the GLSL versions: 1.10, 1.20, 1.30, 1.40, 1.50, 3.30, 4.00, 4.10, 4.20, 4.30, 4.40, 4.50. A β means supported, a - means not supported (yet, or ever).
β¨ abs (genType)
1.10β β1.20β β1.30β β1.40β β1.50β β3.30β β4.00β β4.10β β4.20β β4.30β β4.40β β4.50β β
okay this one has been main character since day one, she's been supported in literally every single version, periodt π
π abs (genIType)
1.10β-1.20β-1.30β β1.40β β1.50β β3.30β β4.00β β4.10β β4.20β β4.30β β4.40β β4.50β β
she was fashionably late to 1.10 and 1.20, showed up at 1.30 and never left the group chat π«Ά
π abs (genDType)
1.10β-1.20β-1.30β-1.40β-1.50β-3.30β-4.00β-4.10β β4.20β β4.30β β4.40β β4.50β β
ngl this one was lowkey in her hermit era for a WHILE, ghosting 1.10 all the way through 4.00, and then finally said hi in 4.10 and has been thriving ever since ππ
π₯ SEE ALSO π₯
sign()β the other half of the "which way are you pointing" duo, go say hi π
π§ COPYRIGHT π§
Copyright Β© 2011-2014 Khronos Group. This material may be distributed subject to the terms and conditions set forth in the Open Publication License, v 1.0, 8 June 1999. http://opencontent.org/openpub/.
π COPYRIGHT π
Copyright Β© 2011-2014 Khronos Group
and that's the whole page bestie, you're now fluent in abs π
β¨
okay so this little legend came out of [FIXME: source] and it's dated 01/03/2018 β shoutout to whoever shipped it, we love you, mwah π and remember: <3G> stands for the OpenGL shading language section, iykyk πΈ
π¦ where this page comes from
- ubuntu jammy: opengl-4-man-doc 1.0~svn33624-1 Β· SGI-Free-Software-B-License-2
- ubuntu noble: opengl-4-man-doc 1.0~svn33624-1 Β· SGI-Free-Software-B-License-2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms