TEXTURELOD(3G)

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

🌸 TEXTURELOD(3G) 🌸

okay bestie, sit down, hydrate, and let me tell you about textureLod from the 3G manual πŸ’… this one is so good and honestly lowkey underrated. it's giving "texture lookup but make it ✨explicit✨."


πŸŽ€ NAME πŸŽ€

textureLod β€” perform a texture lookup with explicit level-of-detail


πŸ¦‹ DECLARATION πŸ¦‹

here's the whole lineup, no notes, exactly as written:

gvec4 textureLod(gsampler1D sampler, float P, float lod);

gvec4 textureLod(gsampler2D sampler, vec2 P, float lod);

gvec4 textureLod(gsampler3D sampler, vec3 P, float lod);

gvec4 textureLod(gsamplerCube sampler, vec3 P, float lod);

float textureLod(sampler1DShadow sampler, vec3 P, float lod);

float textureLod(sampler2DShadow sampler, vec4 P, float lod);

gvec4 textureLod(gsampler1DArray sampler, vec2 P, float lod);

gvec4 textureLod(gsampler2DArray sampler, vec3 P, float lod);

float textureLod(sampler1DArrayShadow sampler, vec3 P, float lod);

gvec4 textureLod(gsamplerCubeArray sampler, vec4 P, float lod);

πŸ’– PARAMETERS πŸ’–

  • sampler β€” the sampler that's got the texture you wanna pull texels out of. it's bound to it, bestie, that's the whole vibe. 🫢
  • P β€” the texture coordinates where the sampling happens. where we're looking, basically. πŸ‘€
  • lod β€” the explicit level-of-detail. you're picking it yourself, no guessing. main character energy, honestly. πŸ‘‘

✨ DESCRIPTION ✨

so textureLod does a texture lookup at coordinate P, from the texture bound to sampler, and it uses an explicit level-of-detail exactly as you specified in lod. no auto-derivative nonsense, we're being decisive here. πŸ’…

lod specifies Ξ»base and sets the partial derivatives as follows:

Ξ΄ u Ξ΄ x = 0 , Ξ΄ v Ξ΄ x = 0 , Ξ΄ w Ξ΄ x = 0 Ξ΄ u Ξ΄ y = 0 , Ξ΄ v Ξ΄ y = 0 , Ξ΄ w Ξ΄ y = 0

like. all zero. every single one. periodt. πŸ’€


πŸ‘‘ VERSION SUPPORT πŸ‘‘

the original had a whole table (we don't do tables here, we do lists, slay) β€” so here's every row, every version, every checkmark, nothing skipped:

  • textureLod β€” 1.10: -, 1.20: -, 1.30: βœ”, 1.40: βœ”, 1.50: βœ”, 3.30: βœ”, 4.00: βœ”, 4.10: βœ”, 4.20: βœ”, 4.30: βœ”, 4.40: βœ”, 4.50: βœ”
  • textureLod (gsampler2DRect{Shadow}) β€” 1.10: -, 1.20: -, 1.30: -, 1.40: βœ”, 1.50: βœ”, 3.30: βœ”, 4.00: βœ”, 4.10: βœ”, 4.20: βœ”, 4.30: βœ”, 4.40: βœ”, 4.50: βœ”
  • textureLod (gsamplerCubeArray) β€” 1.10: -, 1.20: -, 1.30: -, 1.40: -, 1.50: -, 3.30: -, 4.00: βœ”, 4.10: βœ”, 4.20: βœ”, 4.30: βœ”, 4.40: βœ”, 4.50: βœ”
that's OpenGL Shading Language Version, in case you were wondering what the columns were doing. 🌈

🌸 SEE ALSO 🌸

the whole friend group, fr fr:

texelFetch(), texelFetchOffset(), texture(), textureGather(), textureGatherOffset(), textureGatherOffsets(), textureGrad(), textureGradOffset(), 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, bestie πŸŽ€ the source was [FIXME: source], it was dated 01/03/2018, and it lives under the TEXTURELOD(3G) header. go forth and sample with explicit LOD, you absolute icon πŸ¦‹βœ¨

πŸ“¦ where this page comes from