NORMALIZE(3G)
π
NORMALIZE (the 3G one, bestie) π
okay so welcome to the normalize page of the manual, and honestly? it's giving math baddie. it's a GLSL thing, it lives in section 3G, and it's about to make your vectors behave.
β¨ NAME β¨
normalize β calculate the normalize product of two vectors
okay wait. i'm just the messenger here, that's literally what it says. yes it says "two vectors" even though there's one parameter. i don't make the rules, i just vibe with them. π«Ά
πΈ DECLARATION πΈ
genType normalize(genType v);
genDType normalize(genDType v);
two whole signatures, one for genType and one for genDType. double the slay. π
π PARAMETERS π
vβ this is the vector you wanna normalize. that's it, that's the whole parameter. she's simple, she's iconic.
π¦ DESCRIPTION π¦
so normalize hands you back a vector that points in the same direction as its parameter, v, but with length 1. same vibe, same direction, just scaled to be exactly one unit long. no cap. β¨
π VERSION SUPPORT π
here's the vibe check on which OpenGL Shading Language versions said yes to this function. the columns are GLSL versions 1.10, 1.20, 1.30, 1.40, 1.50, 3.30, 4.00, 4.10, 4.20, 4.30, 4.40 and 4.50, and the β means supported while the - means not supported.
normalize (genType) β supported in every single one, no exceptions:
1.10β β1.20β β1.30β β1.40β β1.50β β3.30β β4.00β β4.10β β4.20β β4.30β β4.40β β4.50β β
normalize (genDType) β she arrived late to the party and the early versions simply weren't ready for her:
1.10β-1.20β-1.30β-1.40β-1.50β-3.30β-4.00β β4.10β β4.20β β4.30β β4.40β β4.50β β
so like, genType has been that girl since 1.10, and genDType showed up at 4.00 and has been eating ever since. π
π₯ SEE ALSO π₯
length()
(the sibling. the other half. go read her page too, bestie. π)
π 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 (again, because she said it twice and honestly? queen behavior) π
Copyright Β© 2011-2014 Khronos Group
and that's the whole page, bestie!! π this one came from [FIXME: source] and is dated 01/03/2018, and the manual name we were chilling in this whole time was NORMALIZE(3G). periodt. π
β¨π¦
π¦ 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