INTERPOLATEATOFFSET(3G)

πŸ“¦
version 1.0~svn33624 Β· 4 versions
, in ubuntu jammy, ubuntu noble

✨ 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 want interpolant sampled. 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 Β© 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