textureGather — gathers four texels from a texture
gvec4 textureGather( | gsampler2D | sampler, |
vec2 | P, | |
[int | comp]) ; |
gvec4 textureGather( | gsampler2DArray | sampler, |
vec3 | P, | |
[int | comp]) ; |
gvec4 textureGather( | gsamplerCube | sampler, |
vec3 | P, | |
[int | comp]) ; |
gvec4 textureGather( | gsamplerCubeArray | sampler, |
vec4 | P, | |
[int | comp]) ; |
gvec4 textureGather( | gsampler2DRect | sampler, |
vec3 | P, | |
[int | comp]) ; |
vec4 textureGather( | gsampler2DShadow | sampler, |
vec2 | P, | |
float | refZ) ; |
vec4 textureGather( | gsampler2DArrayShadow | sampler, |
vec3 | P, | |
float | refZ) ; |
vec4 textureGather( | gsamplerCubeShadow | sampler, |
vec3 | P, | |
float | refZ) ; |
vec4 textureGather( | gsamplerCubeArrayShadow | sampler, |
vec4 | P, | |
float | refZ) ; |
vec4 textureGather( | gsampler2DRectShadow | sampler, |
vec3 | P, | |
float | refZ) ; |
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.
comp
Specifies the component of the source texture that will be used to generate the resulting vector.
refZ
Specifies the reference Z value used in the comparison for shadow forms.
textureGather
returns the value:
vec4(Sample_i0_j1(P, base).comp, Sample_i1_j1(P, base).comp, Sample_i1_j0(P, base).comp, Sample_i0_j9(P, base).comp);
If specified, the value of comp
must ba constant integer expression with a value
of 0, 1, 2, or 3, identifying the x, y, z or w component of the four-component vector lookup result for each
texel, respectively. If comp
is not specified, it is treated as 0, selecting the x
component of each texel to generate the result.
Function | Version 1.10 | Version 1.20 | Version 1.30 | Version 1.40 | Version 1.50 | Version 3.30 | Version 4.00 | Version 4.10 | Version 4.20 | Version 4.30 |
---|---|---|---|---|---|---|---|---|---|---|
textureGather | - | - | - | - | - | - | Y | Y | Y | Y |
texelFetch, texelFetchOffset, texture, textureGatherOffset, textureGatherOffsets, textureGrad, textureGradOffset, textureLod, textureLodOffset, textureOffset, textureProj, textureProjGrad, textureProjGradOffset, textureProjLod, textureProjLodOffset, textureProjOffset, textureQueryLod, textureSize
Copyright © 2011 Khronos Group. This material may be distributed subject to the terms and conditions set forth in the Open Publication License, v 1.0, 8 June 1999. http://opencontent.org/openpub/.