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

textureSize - retrieve the dimensions of a level of a texture

Declaration

inttextureSize(gsampler1Dsampler,intlod);ivec2textureSize(gsampler2Dsampler,intlod);ivec3textureSize(gsampler3Dsampler,intlod);ivec2textureSize(gsamplerCubesampler,intlod);inttextureSize(sampler1DShadowsampler,intlod);ivec2textureSize(sampler2DShadowsampler,intlod);ivec2textureSize(samplerCubeShadowsampler,intlod);ivec3textureSize(samplerCubeArraysampler,intlod);ivec3textureSize(samplerCubeArrayShadowsampler,intlod);ivec2textureSize(gsamplerRectsampler);ivec2textureSize(gsamplerRectShadowsampler);ivec2textureSize(gsampler1DArraysampler,intlod);ivec3textureSize(gsampler2DArraysampler,intlod);ivec2textureSize(sampler1DArrayShadowsampler,intlod);ivec3textureSize(sampler2DArrayShadowsampler,intlod);inttextureSize(gsamplerBuffersampler);ivec2textureSize(gsampler2DMSsampler);ivec3textureSize(gsampler2DMSArraysampler);

Description

textureSize returns the dimensions of level lod (if present) of the texture bound to sampler. The
       components in the return value are filled in, in order, with the width, height and depth of the texture.
       For the array forms, the last component of the return value is the number of layers in the texture array.

Name

       textureSize - retrieve the dimensions of a level of a texture

Parameters

sampler
           Specifies the sampler to which the texture whose dimensions to retrieve is bound.

       lod
           Specifies the level of the texture for which to retrieve the dimensions.

See Also

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

Version Support

       ┌───────────────────────┬───────────────────────────────────────────────────────────────────────────────────┐
       │                       │        OpenGLShadingLanguageVersion                                            │
       ├───────────────────────┼──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┤
       │ Function1.101.201.301.401.503.304.004.104.204.304.404.50 │
       │ Name                  │      │      │      │      │      │      │      │      │      │      │      │      │
       ├───────────────────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤
       │ textureSize           │  -   │  -   │  ✔   │  ✔   │  ✔   │  ✔   │  ✔   │  ✔   │  ✔   │  ✔   │  ✔   │  ✔   │
       ├───────────────────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤
       │ textureSize           │  -   │  -   │  -   │  ✔   │  ✔   │  ✔   │  ✔   │  ✔   │  ✔   │  ✔   │  ✔   │  ✔   │
       │ (samplerBuffer,       │      │      │      │      │      │      │      │      │      │      │      │      │
       │ samplerRect{Shadow})  │      │      │      │      │      │      │      │      │      │      │      │      │
       ├───────────────────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤
       │ textureSize           │  -   │  -   │  -   │  -   │  -   │  -   │  ✔   │  ✔   │  ✔   │  ✔   │  ✔   │  ✔   │
       │ (samplerCube{Shadow}) │      │      │      │      │      │      │      │      │      │      │      │      │
       └───────────────────────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┘

See Also