TEXTUREPROJLODOFFSET(3G)
π 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 toPbefore 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 π
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 (yes, again) π
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
- 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