INTERPOLATEATOFFSET(3G)
β¨ INTERPOLATEATOFFSET π
okay bestie, welcome to the 3G manual page for interpolateAtOffset β yes that's the GLSL section, you're in the right place, breathe π«Ά
πΈ NAME πΈ
interpolateAtOffset β sample a varying at specified offset from the center of a pixel
likeβ¦ you pick a spot inside a pixel and ask "hey what's the varying value right there" and it tells you. iconic behavior honestly β¨
π DECLARATION π
look at these signatures, they're giving overloaded queen π
float interpolateAtOffset(float interpolant, vec2 offset);
vec2 interpolateAtOffset(vec2 interpolant, vec2 offset);
vec3 interpolateAtOffset(vec3 interpolant, vec2 offset);
vec4 interpolateAtOffset(vec4 interpolant, vec2 offset);
π¦ PARAMETERS π¦
interpolantβ the interpolant you wanna sample at that specified offset. that's the thing you're asking about πoffsetβ the offset from the center of the pixel where you wantinterpolantsampled. this is your little "here, specifically here" pointer πΈ
π DESCRIPTION π
so interpolateAtOffset returns the value of the input varying interpolant sampled at an offset from the center of the pixel specified by offset.
the two floating-point components of offset give the offset in pixels in the x and y directions from the center of the pixel, respectively. so like, component one = x direction, component two = y direction, no cap π
an offset of (0, 0) identifies the center of the pixel. that's home base, bestie π
and the range and granularity of offsets supported by this function is implementation-dependent. so don't come for me if your driver has opinions, that's just how it is π
π₯ VERSION SUPPORT π₯
the "OpenGL Shading Language Version" tea β here's when interpolateAtoOffset actually shows up:
- 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 yeah she didn't exist until 4.00 and then she ate every single version after π periodt.
π SEE ALSO π
interpolateAtCentroid()interpolateAtSample()
the whole interpolate-at-a-thing friend group, go read them too iykyk π
π 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
okay that's the whole page bestie, you're officially educated π§β¨ and for the record, this came out of the [FIXME: source] manual, dated 01/03/2018, filed under INTERPOLATEATOFFSET(3G) β mwah, go forth and sample those varyings ππ
π¦ 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