LOG(3G)
โจ LOG(3G) โจ
okay bestie, gather round ๐ this is the manual page for log, from section 3G of the manual (yes, the OpenGL shading language corner of the docs ๐). It's giving "math but make it shader", and honestly? Iconic.
๐ธ NAME ๐ธ
log โ return the natural logarithm of the parameter ๐งฎโจ
๐ DECLARATION ๐
genType log(genType x);
That's it. That's the whole signature. Simple, clean, main character energy fr fr ๐
๐ PARAMETERS ๐
xโ the value you want to take the natural logarithm of. Hand it over and letlogdo its thing ๐
๐ฆ DESCRIPTION ๐ฆ
So log returns the natural logarithm of x, which means it gives you back the value y that satisfies:
x = e^y
โ ๏ธ okay so important: the result is undefined if x โค 0. Not "weird", not "surprising" โ undefined. So don't be out here logging zero or negative numbers and then acting shocked when things go sideways ๐ญ๐
๐ VERSION SUPPORT ๐
Bestie here's the vibe check: this function is supported in every version of the OpenGL Shading Language listed. Every. Single. One. No cap ๐ฅ
The table in the original tracks two column groups: Function Name and OpenGL Shading Language Version. And the row is log (genType). Here's the receipts โจ:
- 1.10 โ โ
- 1.20 โ โ
- 1.30 โ โ
- 1.40 โ โ
- 1.50 โ โ
- 3.30 โ โ
- 4.00 โ โ
- 4.10 โ โ
- 4.20 โ โ
- 4.30 โ โ
- 4.40 โ โ
- 4.50 โ โ
Twelve for twelve. She ate and left no crumbs ๐๐
๐ธ SEE ALSO ๐ธ
Go be nosy, bestie, these are the siblings ๐
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 ๐
Copyright ยฉ 2011-2014 Khronos Group
and that's the whole page, bestie ๐ซถ source says [FIXME: source] (yeah, they left it as a FIXME, we love that for them ๐) and the date on this one is 01/03/2018. LOG(3G) forever, mwah ๐โจ
๐ฆ 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