POW(3G)
π POW(3G) π
okay bestie, welcome to the GLSL power-up page β¨ this one lives in section 3G of the manual (yes, the OpenGL shading one, iykyk) and it's literally just one function. one. and it ate. π«Ά
β¨ NAME β¨
pow β returns the value of the first parameter raised to the power of the second πΈ
π DECLARATION π
genType pow(genType x, genType y);
π¦ PARAMETERS π¦
xβ bestie, this is the value you're raising to the poweryπyβ and this is the power you're raisingxto π
π DESCRIPTION π
pow hands you back the value of $x$ raised to the $y$ power, aka $x^y$. slay. β¨
π okay but real talk though: the result is undefined if $x < 0$, or if $x = 0$ and $y \leq 0$. like. undefined undefined. not "we'll figure it out", not "probably fine". undefined. protect your shaders, bestie. π
π VERSION SUPPORT π
so the whole vibe check here is: does pow show up in your GLSL version? and the answer is yes across the entire board. every single one. periodt. π
OpenGL Shading Language Version β pow is supported in all of these:
1.10β β yes1.20β β yes1.30β β yes1.40β β yes1.50β β yes3.30β β yes4.00β β yes4.10β β yes4.20β β yes4.30β β yes4.40β β yes4.50β β yes
not a single β in sight. iconic behaviour, honestly. π₯
πΈ SEE ALSO πΈ
go give these siblings some love too, they're all in the same math-girlie family:
sin()cos()sinh()cosh()
π 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 Β© 2011-2014 Khronos Group
and that's the whole page, bestie!! π mwah π
this came to you from [FIXME: source], dated 01/03/2018, and it's still out here being POW(3G) at the bottom like the main character it is. go forth and exponentiate responsibly. π¦β¨
π¦ 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