TEXELFETCH(3G)

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

πŸŽ€ NAME πŸŽ€

okay bestie, say hi to texelFetch β€” she performs a lookup of a single texel within a texture. one texel. that's her whole job and she does it flawlessly πŸ’… this is page TEXELFETCH(3G) btw, so you know she's an OpenGL Shading Language girlie.


✨ DECLARATION ✨

here's every single signature, no skips, no edits, all nine of them:

gvec4 texelFetch(gsampler1D sampler, int P, int lod);

gvec4 texelFetch(gsampler2D sampler, ivec2 P, int lod);

gvec4 texelFetch(gsampler3D sampler, ivec3 P, int lod);

gvec4 texelFetch(gsampler2DRect sampler, ivec2 P);

gvec4 texelFetch(gsampler1DArray sampler, ivec2 P, int lod);

gvec4 texelFetch(gsampler2DArray sampler, ivec3 P, int lod);

gvec4 texelFetch(gsamplerBuffer sampler, int P);

gvec4 texelFetch(gsampler2DMS sampler, ivec2 P, sample sample);

gvec4 texelFetch(gsampler2DMSArray sampler, ivec3 P, sample sample);

🌸 PARAMETERS 🌸

  • sampler β€” this is the sampler the texture is bound to, aka the one you're pulling texels out of. you gotta tell her where the goods live 🫢
  • P β€” the texture coordinates at which the texture will be sampled. like, the address of the texel you're obsessed with.
  • lod β€” if it's there, it specifies the level-of-detail within the texture from which the texel will be fetched. no lod, no mip levels, iykyk.
  • sample β€” for multisampled fetches only, this specifies which sample within the texel will be returned. one texel, many samples, she picks one for you 😭

πŸ’œ DESCRIPTION πŸ’œ

so what does texelFetch actually do? she performs a lookup of a single texel from texture coordinate P in the texture bound to sampler. that's it, that's the whole vibe.

for the array forms, the array layer lives in the last component of P β€” don't forget her, she's easy to lose πŸ™ˆ

the lod parameter, if present, specifies the level-of-detail from which the texel will be fetched. and the sample specifies which sample within the texel will be returned when reading from a multi-sample texture.


πŸ‘‘ VERSION SUPPORT πŸ‘‘

here's the ✨era timeline✨ of when each form of texelFetch entered the OpenGL Shading Language Version chat. βœ” means she's there, - means she has not arrived yet.

  • texelFetch β€” 1.10: -, 1.20: -, 1.30: βœ”, 1.40: βœ”, 1.50: βœ”, 3.30: βœ”, 4.00: βœ”, 4.10: βœ”, 4.20: βœ”, 4.30: βœ”, 4.40: βœ”, 4.50: βœ”
  • texelFetch (gsampler2DRect, gsamplerBuffer) β€” 1.10: -, 1.20: -, 1.30: -, 1.40: βœ”, 1.50: βœ”, 3.30: βœ”, 4.00: βœ”, 4.10: βœ”, 4.20: βœ”, 4.30: βœ”, 4.40: βœ”, 4.50: βœ”
  • texelFetch (gsampler2DMS, gsampler2DMSArray) β€” 1.10: -, 1.20: -, 1.30: -, 1.40: -, 1.50: βœ”, 3.30: βœ”, 4.00: βœ”, 4.10: βœ”, 4.20: βœ”, 4.30: βœ”, 4.40: βœ”, 4.50: βœ”

πŸ”₯ SEE ALSO πŸ”₯

run, don't walk, to these sisters:

  • texelFetch()
  • texture()
  • textureGather()
  • textureGatherOffset()
  • textureGatherOffsets()
  • textureGrad()
  • textureGradOffset()
  • textureLod()
  • textureLodOffset()
  • textureOffset()
  • textureProj()
  • textureProjGrad()
  • textureProjGradOffset()
  • textureProjLod()
  • textureProjLodOffset()
  • textureProjOffset()
  • textureQueryLod()
  • textureSize()

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


and that's the whole page, periodt. this was [FIXME: source], dated 01/03/2018, and the icon herself is TEXELFETCH(3G). go fetch some texels, you absolute main character πŸŒˆπŸ’–βœ¨
πŸ“¦ where this page comes from