tex1Dgrad - HLSL
Microsoft DirectX 9.0 SDK Update (October 2004)

tex1Dgrad - HLSL


1-D gradient texture lookup.

Syntax

ret tex1Dgrad(s, t, ddx, ddy)

Where:

NameIn/OutTemplate TypeComponent TypeSize
sinobjectsampler1D1
tinvectorfloat1
ddxinvectorfloat1
ddyinvectorfloat1
retoutvectorfloat4

This function samples a texture using the sampler specified by s, the texture coordinate 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 ShaderPixel Shader
n/aps_2_0


© 2004 Microsoft Corporation. All rights reserved.
Feedback? Please provide us with your comments on this topic.
For more help, visit the DirectX Developer Center.