tex3D
Keywords: tex3D, NVIDIA, NVIDIA Cg Toolkit, Cg Toolkit, Shader, Shader Programming, GPU Shader Programming, GPU Program

> ## Name

> tex3D - performs a texture lookup in a given 3D sampler. May also use pre computed derivatives if those are provided.

> ## Synopsis

>     float4 tex3D(sampler3D samp, float3 s)
>     float4 tex3D(sampler3D samp, float3 s, int texelOff)

>     float4 tex3D(sampler3D samp, float3 s, float3 dx, float3 dy)
>     float4 tex3D(sampler3D samp, float3 s, float3 dx, float3 dy, int texelOff)

>     int4 tex3D(isampler3D samp, float3 s)
>     int4 tex3D(isampler3D samp, float3 s, int texelOff)

>     int4 tex3D(isampler3D samp, float3 s, float3 dx, float3 dy)
>     int4 tex3D(isampler3D samp, float3 s, float3 dx, float3 dy, int texelOff)

>     unsigned int4 tex3D(usampler3D samp, float3 s)
>     unsigned int4 tex3D(usampler3D samp, float3 s, int texelOff)

>     unsigned int4 tex3D(usampler3D samp, float3 s, float3 dx, float3 dy)
>     unsigned int4 tex3D(usampler3D samp, float3 s, float3 dx, float3 dy,
>                         int texelOff)

> ## Parameters

> samp
>   Sampler to lookup.
> s
>   Coordinates to perform the lookup.
> 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 use texel offset texelOff to compute final texel.

> ## Profile Support

> tex3D is supported in all fragment profiles and all vertex profiles starting with vp40, variants with texel offsets are only supported in gp4 and newer profiles. Variants with integer samplers are also only suppported in gp4 and newer profiles.

> ## See Also

> tex3Dbias, tex3Dlod, tex3Dproj