TEXTUREGATHER(3G)

    .SH "NAME" textureGather - gathers four texels from a texture
    .SH "DECLARATION"

            .HP u gvec4 textureGather(gsampler2D sampler, vec2 P, [int comp]);
            .HP u gvec4 textureGather(gsampler2DArray sampler, vec3 P, [int comp]);
            .HP u gvec4 textureGather(gsamplerCube sampler, vec3 P, [int comp]);
            .HP u gvec4 textureGather(gsamplerCubeArray sampler, vec4 P, [int comp]);
            .HP u gvec4 textureGather(gsampler2DRect sampler, vec3 P, [int comp]);
            .HP u vec4 textureGather(sampler2DShadow sampler, vec2 P, float refZ);
            .HP u vec4 textureGather(sampler2DArrayShadow sampler, vec3 P, float refZ);
            .HP u vec4 textureGather(samplerCubeShadow sampler, vec3 P, float refZ);
            .HP u vec4 textureGather(samplerCubeArrayShadow sampler, vec4 P, float refZ);
            .HP u vec4 textureGather(sampler2DRectShadow sampler, vec2 P, float refZ);

    .SH "PARAMETERS"

        .PP sampler

                    Specifies the sampler to which the texture from which texels will be retrieved is bound.

            .RE
            .PP P

                        Specifies the texture coordinates at which texture will be sampled.

                .RE
                .PP comp

                            Specifies the component of the source texture that will be used to generate the resulting vector.

                    .RE
                    .PP refZ

                                Specifies the reference Z value used in the comparison for shadow forms.

                        .RE

                    .SH "DESCRIPTION"
                        .PP textureGather returns the value:
                        .PP
                        vec4(Sample_i0_j1(P, base).comp,
                             Sample_i1_j1(P, base).comp,
                             Sample_i1_j0(P, base).comp,
                             Sample_i0_j0(P, base).comp);

                    .PP If specified, the value of comp must be a 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.

                    .SH "VERSION SUPPORT"
                        .TS allbox tab(:); lB cB s s s s s s s s s s s lB cB cB cB cB cB cB cB cB cB cB cB cB. T{ T}:T{ OpenGL Shading Language Version T} T{ Function Name T}:T{ 1.10 T}:T{ 1.20 T}:T{ 1.30 T}:T{ 1.40 T}:T{ 1.50 T}:T{ 3.30 T}:T{ 4.00 T}:T{ 4.10 T}:T{ 4.20 T}:T{ 4.30 T}:T{ 4.40 T}:T{ 4.50 T} l c c c c c c c c c c c c. T{ textureGather T}:T{ - T}:T{ - T}:T{ - T}:T{ - T}:T{ - T}:T{ - T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}

                    .SH "SEE ALSO"
                        .PP texelFetch(), texelFetchOffset(), texture(), textureGatherOffset(), textureGatherOffsets(), textureGrad(), textureGradOffset(), textureLod(), textureLodOffset(), textureOffset(), textureProj(), textureProjGrad(), textureProjGradOffset(), textureProjLod(), textureProjLodOffset(), textureProjOffset(), textureQueryLod(), textureSize()

                    .SH "COPYRIGHT"
                        .PP Copyright © 2011-2014 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. https://opencontent.org/openpub/.

COPYRIGHT
Copyright © 2011-2014 Khronos Group