textureOffset - perform a texture lookup with offset
Contents
Copyright
Copyright © 2012-2014 Khronos Group
[FIXME: source] 11/18/2024 TEXTUREOFFSET(3G)
Declaration
gvec4textureOffset(gsampler1Dsampler,floatP,intoffset,[floatbias]);gvec4textureOffset(gsampler2Dsampler,vec2P,ivec2offset,[floatbias]);gvec4textureOffset(gsampler3Dsampler,vec3P,ivec3offset,[floatbias]);gvec4textureOffset(gsampler2DRectsampler,vec2P,ivec2offset);floattextureOffset(sampler2DRectShadowsampler,vec3P,ivec2offset);floattextureOffset(sampler1DShadowsampler,vec3P,intoffset,[floatbias]);floattextureOffset(sampler2DShadowsampler,vec4P,ivec2offset,[floatbias]);gvec4textureOffset(gsampler1DArraysampler,vec2P,intoffset,[floatbias]);gvec4textureOffset(gsampler2DArraysampler,vec3P,ivec2offset,[floatbias]);floattextureOffset(sampler1DArrayShadowsampler,vec3P,intoffset);floattextureOffset(sampler2DArrayShadowsampler,vec4P,vec2offset);
Description
textureOffset performs a texture lookup at coordinate P from the texture bound to sampler with an an
additional offset, specified in texels in offset that will be applied to the (u, v, w) texture
coordinates before looking up each texel. The offset value must be a constant expression. A limited range
of offset values are supported; the minimum and maximum offset values are implementation-dependent and
may be determined by querying GL_MIN_PROGRAM_TEXEL_OFFSET and GL_MAX_PROGRAM_TEXEL_OFFSET, respectively.
Note that offset does not apply to the layer coordinate for texture arrays. Also note that offsets are
not supported for cube maps.
Name
textureOffset - perform a texture lookup with offset
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.
offset
Specifies offset, in texels that will be applied to P before looking up the texel.
See Also
texelFetch(), texelFetchOffset(), texture(), textureGather(), textureGatherOffset(),
textureGatherOffsets(), textureGrad(), textureGradOffset(), textureLod(), textureLodOffset(),
textureProj(), textureProjGrad(), textureProjGradOffset(), textureProjLod(), textureProjLodOffset(),
textureProjOffset(), textureQueryLod(), textureSize()
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 │ │ │ │ │ │ │ │ │ │ │ │ │
├──────────────────────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤
│ textureOffset │ - │ - │ ✔ │ ✔ │ ✔ │ ✔ │ ✔ │ ✔ │ ✔ │ ✔ │ ✔ │ ✔ │
├──────────────────────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤
│ textureOffset │ - │ - │ - │ ✔ │ ✔ │ ✔ │ ✔ │ ✔ │ ✔ │ ✔ │ ✔ │ ✔ │
│ (gsampler2DRect{Shadow}) │ │ │ │ │ │ │ │ │ │ │ │ │
└──────────────────────────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┘
