INTERPOLATEATCENTROI(3G)
π NAME π
ok so this is interpolateAtCentroid β it samples a varying at the centroid of a pixel, bestie π
(it's from the 3G manual, and the header's got a lil [FIXME: manual] note hanging on it, we love a work in progress π«Ά)
β¨ DECLARATION β¨
here's the whole squad of overloads, no cap:
float interpolateAtCentroid(float interpolant);
vec2 interpolateAtCentroid(vec2 interpolant);
vec3 interpolateAtCentroid(vec3 interpolant);
vec4 interpolateAtCentroid(vec4 interpolant);
πΈ PARAMETERS πΈ
interpolantβ this is the interpolant you're sampling at the pixel centroid. that's the whole vibe, she's the main character π
π DESCRIPTION π
interpolateAtCentroid returns the value of the input varying interpolant, sampled at a location that's inside both the pixel and the primitive being processed π¦
and likeβ¦ the value you get back? it's literally the value that would've been assigned to the input variable if you'd declared it with the centroid qualifier. same energy, fr fr β¨
π VERSION SUPPORT π
ok so this is the part where the original flexes a whole table β we're doing it as a list because tables are not the vibe here, but every single detail is intact, promise π
Function name: interpolateAtCentroid β and these are the OpenGL Shading Language Versions:
1.10β-(not supported π)1.20β-(not supported π)1.30β-(not supported π)1.40β-(not supported π)1.50β-(not supported π)3.30β-(not supported π)4.00ββ(slay!! we're in π)4.10ββ4.20ββ4.30ββ4.40ββ4.50ββ
so basically: dead until 4.00, then iconic forever. periodt π
π«Ά SEE ALSO π«Ά
interpolateAtSample()interpolateAtOffset()
(go read those too, they're the friend group π§)
π 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, yes really) π
Copyright Β© 2011-2014 Khronos Group
lowkey important: the original page's footer source is[FIXME: source], the date is01/03/2018, and the whole thing signs off asINTERPOLATEATCENTROI(3G)β so that's the receipts, bestie π§Ύβ¨
that's the page!! go sample something at a centroid, you got this πβ¨ππ¦πΈπ π«Ά
π¦ 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