STEP(3G)
π step(3G) β bestie edition π
okay so we're doing step(3G) today and honestly? she's a little icon. a tiny queen. a whole binary mood. let's get into it π«Ά
β¨ NAME β¨
step β generate a step function by comparing two values π
β¨ DECLARATION β¨
here's the receipts, exactly as written, no cap:
genType step(genType edge, genType x);
genType step(float edge, genType x);
genDType step(genDType edge, genDType x);
genDType step(double edge, genDType x);
four whole overloads. she's versatile like that. π
β¨ PARAMETERS β¨
edgeβ this one specifies the location of the edge of the step function. like, where the vibe flips. πxβ and this is the value that gets used to generate the step function. the main character being judged, fr fr. π
β¨ DESCRIPTION β¨
so step generates a step function by comparing x to edge. that's the whole gig. πΈ
and for element i of the return value? 0.0 gets returned if x[i] < edge[i], and 1.0 gets returned otherwise. so it's giving "nope" or "yes ma'am", nothing in between. binary behaviour, iconic energy, periodt. πβ¨
β¨ VERSION SUPPORT β¨
so here's the glow-up timeline for our girl across all the OpenGL Shading Language versions. the columns in the original were 1.10, 1.20, 1.30, 1.40, 1.50, 3.30, 4.00, 4.10, 4.20, 4.30, 4.40, 4.50 β and yes bestie, I'm listing every single one because we do NOT skip details in this house. π
step (genType) β she's been here since day one and she never left:
1.10β β1.20β β1.30β β1.40β β1.50β β3.30β β4.00β β4.10β β4.20β β4.30β β4.40β β4.50β β
step (genDType) β she was late to the party but she ate when she arrived:
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 the genDType girlie really said "I'll show up at 4.00 and steal the whole show" and honestly? she did. ππ
β¨ SEE ALSO β¨
go give these two a follow, they're in the same friend group:
mix()smoothstep()
β¨ 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 β¨ (yes, again, she's thorough)
Copyright Β© 2011-2014 Khronos Group
okay bestie that's the whole page, we ate and left absolutely no crumbs. πβ¨
and for the cute sign-off: this one came from [FIXME: source], dated 01/03/2018, and it's filed under the manual name STEP(3G). 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