TEXTUREPROJLODOFFSET(3G)

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

πŸŽ€ NAME πŸŽ€

textureProjLodOffset β€” bestie, this one does a texture lookup with projection AND explicit level-of-detail AND an offset. Three things at once, she's an overachiever πŸ’…


πŸ¦‹ DECLARATION πŸ¦‹

okay so here's the whole roster of overloads, copy-pasted EXACTLY because I do not play with signatures:

gvec4 textureProjLodOffset(gsampler1D sampler, vec2 P, float lod,
                           int offset);

gvec4 textureProjLodOffset(gsampler1D sampler, vec4 P, float lod,
                           int offset);

gvec4 textureProjLodOffset(gsampler2D sampler, vec3 P, float lod,
                           ivec2 offset);

gvec4 textureProjLodOffset(gsampler2D sampler, vec4 P, float lod,
                           ivec2 offset);

gvec4 textureProjLodOffset(gsampler3D sampler, vec4 P, float lod,
                           ivec3 offset);

float textureProjLodOffset(sampler1DShadow sampler, vec4 P, float lod,
                           int offset);

float textureProjLodOffset(sampler2DShadow sampler, vec4 P, float lod,
                           ivec2 offset);

seven of them. seven. she's booked and busy ✨


🌸 PARAMETERS 🌸

  • sampler β€” the sampler your texture is bound to. like, the vibe you're pulling texels from 🫢
  • P β€” the texture coordinates where the sampling happens. where you're pointing the little flashlight πŸ”¦
  • lod β€” the explicit level-of-detail to fetch texels from. you're telling it, not asking it, no cap πŸ‘‘
  • offset β€” the offset, in texels, applied to P before the texels get fetched. tiny nudge, big difference πŸ’«

πŸ’– DESCRIPTION πŸ’–

so textureProjLodOffset performs a texture lookup with projection, from an explicitly specified level-of-detail, with an offset applied to the texture coordinates before sampling. it's giving multitasking main character energy fr fr.

here's the tea on how the coordinates work πŸ“: the texture coordinates consumed from P β€” not including the last component of P β€” get divided by the last component of P. that's the projection part, periodt.

then, for the shadow forms, the resulting 3rd component of P is used as Dref. πŸ’…

once all those values are computed, the texture lookup proceeds exactly as in textureLodOffset() β€” with lod used to specify the level-of-detail the texture gets sampled from, and offset used to specifiy the offset, in texels, applied to the texture coordinates before sampling. (yes, "specifiy" β€” I'm keeping it, that's the original's typo and I respect her πŸ™ˆ)


⭐ VERSION SUPPORT ⭐

which GLSL versions said yes to her? vibe check:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                      β”‚        OpenGL Shading Language Version                                            β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€
β”‚ Function             β”‚ 1.10 β”‚ 1.20 β”‚ 1.30 β”‚ 1.40 β”‚ 1.50 β”‚ 3.30 β”‚ 4.00 β”‚ 4.10 β”‚ 4.20 β”‚ 4.30 β”‚ 4.40 β”‚ 4.50 β”‚
β”‚ Name                 β”‚      β”‚      β”‚      β”‚      β”‚      β”‚      β”‚      β”‚      β”‚      β”‚      β”‚      β”‚      β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€
β”‚ textureProjLodOffset β”‚  -   β”‚  -   β”‚  βœ”   β”‚  βœ”   β”‚  βœ”   β”‚  βœ”   β”‚  βœ”   β”‚  βœ”   β”‚  βœ”   β”‚  βœ”   β”‚  βœ”   β”‚  βœ”   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”˜

tl;dr: she showed up in 1.30 and never left. 1.10 and 1.20 said no. everyone after said slay πŸ”₯


🌈 SEE ALSO 🌈

her whole friend group, go say hi:

  • texelFetch()
  • texelFetchOffset()
  • texture()
  • textureGather()
  • textureGatherOffset()
  • textureGatherOffsets()
  • textureGrad()
  • textureGradOffset()
  • textureLod()
  • textureLodOffset()
  • textureOffset()
  • textureProj()
  • textureProjGrad()
  • textureProjGradOffset()
  • textureProjLod()
  • 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


okay bestie that's the whole page, mwah 🫢 this came from the [FIXME: source] situation, dated 01/03/2018, and it's filed under TEXTUREPROJLODOFFSET(3G) β€” go forth and sample responsibly πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from