tex3Dgrad - HLSL

3D gradient volume texture lookup.

Syntax

ret tex3Dgrad(s, t, ddx, ddy)

Where:

Name In/Out Template Type Component Type Size
s in object sampler1D 1
t in vector float 3
ddx in vector float 3
ddy in vector float 3
ret out vector float 4

This function samples a texture using the sampler specified by s, the texture coordinates in t, the x gradient in ddx, and the y gradient in ddy. The gradient values select the appropriate mipmap level of the texture for sampling.

When compiling code to ps_3_0, significant code reordering is done to move gradient computations outside of flow control.

Minimum Shader Version

This intrinsic function is supported in the following (or later) shader versions:

Vertex Shader Pixel Shader
n/a ps_2_0 *

* - If the D3DPSHADERCAPS2_0 cap is set with D3DD3DPSHADERCAPS2_0_GRADIENTINSTRUCTIONS, the compiler maps this statement to texldd - ps.

See Also

HLSL Intrinsic Functions