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

textureQueryLod - compute the level-of-detail that would be used to sample from a texture

Declaration

vec2textureQueryLod(gsampler1Dsampler,floatP);vec2textureQueryLod(gsampler2Dsampler,vec2P);vec2textureQueryLod(gsampler3Dsampler,vec3P);vec2textureQueryLod(gsamplerCubesampler,vec3P);vec2textureQueryLod(gsampler1DArraysampler,floatP);vec2textureQueryLod(gsampler2DDArraysampler,vec2P);vec2textureQueryLod(gsamplerCubeArraysampler,vec3P);vec2textureQueryLod(gsampler1DShadowsampler,floatP);vec2textureQueryLod(gsampler2DShadowsampler,vec2P);vec2textureQueryLod(gsamplerCubeShadowsampler,vec3P);vec2textureQueryLod(gsampler1DArrayShadowsampler,floatP);vec2textureQueryLod(gsampler2DArrayShadowsampler,vec2P);vec2textureQueryLod(gsamplerCubeArrayShadowsampler,vec3P);

Description

Availableonlyinthefragmentshader, textureQueryLod computes the level-of-detail that would be used to
       sample from a texture. The mipmap array(s) that would be accessed is returned in the x component of the
       return value. The computed level-of-detail relative to the base level is returned in the y component of
       the return value.

       If called on an incomplete texture, the result of the operation is undefined.

Name

       textureQueryLod - compute the level-of-detail that would be used to sample from a texture

Parameters

sampler
           Specifies the sampler to which the texture whose level-of-detail will be queried is bound.

       P
           Specifies the texture coordinates at which the level-of-detail will be queried.

See Also

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

Version Support

       ┌─────────────────┬───────────────────────────────────────────────────────────────────────────────────┐
       │                 │        OpenGLShadingLanguageVersion                                            │
       ├─────────────────┼──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┤
       │ Function1.101.201.301.401.503.304.004.104.204.304.404.50 │
       │ Name            │      │      │      │      │      │      │      │      │      │      │      │      │
       ├─────────────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤
       │ textureQueryLod │  -   │  -   │  -   │  -   │  -   │  -   │  ✔   │  ✔   │  ✔   │  ✔   │  ✔   │  ✔   │
       └─────────────────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┘

See Also