Risk-Aware Code Review: Auto Approve Low-Risk Changes
LiveReview LiveReview LiveReview - Free, Risk-Aware Code Review: Auto Approve Low-Risk Changes | Product Hunt LiveReview - Free, Risk-Aware Code Review: Auto Approve Low-Risk Changes | Product Hunt GitHub Install Now

We'd appreciate a star

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                                            │
       ├───────────────────────┼──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┤
       │ 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                  │      │      │      │      │      │      │      │      │      │      │      │      │
       ├───────────────────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤
       │ textureSize           │  -   │  -   │  ✔   │  ✔   │  ✔   │  ✔   │  ✔   │  ✔   │  ✔   │  ✔   │  ✔   │  ✔   │
       ├───────────────────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤
       │ textureSize           │  -   │  -   │  -   │  ✔   │  ✔   │  ✔   │  ✔   │  ✔   │  ✔   │  ✔   │  ✔   │  ✔   │
       │ (samplerBuffer,       │      │      │      │      │      │      │      │      │      │      │      │      │
       │ samplerRect{Shadow})  │      │      │      │      │      │      │      │      │      │      │      │      │
       ├───────────────────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤
       │ textureSize           │  -   │  -   │  -   │  -   │  -   │  -   │  ✔   │  ✔   │  ✔   │  ✔   │  ✔   │  ✔   │
       │ (samplerCube{Shadow}) │      │      │      │      │      │      │      │      │      │      │      │      │
       └───────────────────────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┘

See Also