logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

texelFetch - perform a lookup of a single texel within a texture

Declaration

gvec4texelFetch(gsampler1Dsampler,intP,intlod);gvec4texelFetch(gsampler2Dsampler,ivec2P,intlod);gvec4texelFetch(gsampler3Dsampler,ivec3P,intlod);gvec4texelFetch(gsampler2DRectsampler,ivec2P);gvec4texelFetch(gsampler1DArraysampler,ivec2P,intlod);gvec4texelFetch(gsampler2DArraysampler,ivec3P,intlod);gvec4texelFetch(gsamplerBuffersampler,intP);gvec4texelFetch(gsampler2DMSsampler,ivec2P,samplesample);gvec4texelFetch(gsampler2DMSArraysampler,ivec3P,samplesample);

Description

texelFetch performs a lookup of a single texel from texture coordinate P in the texture bound to sampler.
       The array layer is specified in the last component of P for array forms. The lod parameter (if present)
       specifies the level-of-detail from which the texel will be fetched. The sample specifies which sample
       within the texel will be returned when reading from a multi-sample texure.

Name

       texelFetch - perform a lookup of a single texel within a texture

Parameters

sampler
           Specifies the sampler to which the texture from which texels will be retrieved is bound.

       P
           Specifies the texture coordinates at which texture will be sampled.

       lod
           If present, specifies the level-of-detail within the texture from which the texel will be fetched.

       sample
           For multisampled fetches, specifies which sample within the texel from which which will be returned.

See Also

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

Version Support

       ┌────────────────────┬───────────────────────────────────────────────────────────────────────────────────┐
       │                    │        OpenGLShadingLanguageVersion                                            │
       ├────────────────────┼──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┤
       │ Function1.101.201.301.401.503.304.004.104.204.304.404.50 │
       │ Name               │      │      │      │      │      │      │      │      │      │      │      │      │
       ├────────────────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤
       │ texelFetch         │  -   │  -   │  ✔   │  ✔   │  ✔   │  ✔   │  ✔   │  ✔   │  ✔   │  ✔   │  ✔   │  ✔   │
       ├────────────────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤
       │ texelFetch         │  -   │  -   │  -   │  ✔   │  ✔   │  ✔   │  ✔   │  ✔   │  ✔   │  ✔   │  ✔   │  ✔   │
       │ (gsampler2DRect,   │      │      │      │      │      │      │      │      │      │      │      │      │
       │ gsamplerBuffer)    │      │      │      │      │      │      │      │      │      │      │      │      │
       ├────────────────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤
       │ texelFetch         │  -   │  -   │  -   │  -   │  ✔   │  ✔   │  ✔   │  ✔   │  ✔   │  ✔   │  ✔   │  ✔   │
       │ (gsampler2DMS,     │      │      │      │      │      │      │      │      │      │      │      │      │
       │ gsampler2DMSArray) │      │      │      │      │      │      │      │      │      │      │      │      │
       └────────────────────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┘

See Also