NAME
    tex2D - performs a texture lookup in a given 2D sampler and, in some
    cases, a shadow comparison. May also use pre computed derivatives if
    those are provided.

SYNOPSIS
      float4 tex2D(sampler2D samp, float2 s)
      float4 tex2D(sampler2D samp, float2 s, int texelOff)
      float4 tex2D(sampler2D samp, float3 s)
      float4 tex2D(sampler2D samp, float3 s, int texelOff)

      float4 tex2D(sampler2D samp, float2 s, float2 dx, float2 dy)
      float4 tex2D(sampler2D samp, float2 s, float2 dx, float2 dy, int texelOff)
      float4 tex2D(sampler2D samp, float3 s, float2 dx, float2 dy)
      float4 tex2D(sampler2D samp, float3 s, float2 dx, float2 dy, int texelOff)

      int4 tex2D(isampler2D samp, float2 s)
      int4 tex2D(isampler2D samp, float2 s, int texelOff)

      int4 tex2D(isampler2D samp, float2 s, float2 dx, float2 dy)
      int4 tex2D(isampler2D samp, float2 s, float2 dx, float2 dy, int texelOff)

      unsigned int4 tex2D(usampler2D samp, float2 s)
      unsigned int4 tex2D(usampler2D samp, float2 s, int texelOff)

      unsigned int4 tex2D(usampler2D samp, float2 s, float2 dx, float2 dy)
      unsigned int4 tex2D(usampler2D samp, float2 s, float2 dx, float2 dy,
                          int texelOff)

PARAMETERS
    samp    Sampler to lookup.

    s       Coordinates to perform the lookup. If an extra coordinate
            compared to the texture dimensionality is present it is used to
            perform a shadow comparison. The value used in the shadow
            comparison is always the last component of the coordinate
            vector.

    dx      Pre computed derivative along the x axis.

    dy      Pre computed derivative along the y axis.

    texelOff
            Offset to be added to obtain the final texel.

DESCRIPTION
    Performs a texture lookup in sampler *samp* using coordinates *s*, may
    use and derivatives *dx* and *dy*, also may perform shadow comparison
    and use texel offset *texelOff* to compute final texel.

PROFILE SUPPORT
    tex2D is supported in all fragment profiles and all vertex profiles
    starting with vp40, variants with shadow comparison are only supported
    in fp40 and newer profiles, variants with texel offsets are only
    supported in gp4 and newer profiles. Variants with integer textures are
    also only supported in gp4 and newer profiles.

SEE ALSO
    the tex2Dbias manpage, the tex2Dlod manpage, the tex2Dproj manpage

