Export (0) Print
Expand All
abs
all
any
cos
ddx
ddy
dot
dst
exp
fma
lit
log
mad
max
min
mul
pow
rcp
sin
tan
Expand Minimize

texCUBEgrad

Samples a cube texture using a gradient to select the mip level.

ret texCUBEgrad(s, t, ddx, ddy)

 

Parameters

ItemDescription

s

[in] The sampler state.

t

[in] The texture coordinate.

ddx

[in] Rate of change of the surface geometry in the x direction.

ddy

[in] Rate of change of the surface geometry in the y direction.

 

Return Value

The value of the texture data.

Type Description

NameIn/Out Template Type Component Type Size
sinobject samplerCUBE 1
tinvector float 3
ddxinvector float 3
ddyinvector float 3
retoutvector float 4

 

Minimum Shader Model

This function is supported in the following shader models.

Shader ModelSupported
Shader Model 4 yes (pixel shader only)
Shader Model 3 (DirectX HLSL) yes1 (pixel shader only)
Shader Model 2 (DirectX HLSL) yes2 (pixel shader only)
Shader Model 1 (DirectX HLSL) no

 

  1. Significant code reordering is done to move gradient computations outside of flow control.
  2. If the D3DPSHADERCAPS2_0 cap is set with D3DD3DPSHADERCAPS2_0_GRADIENTINSTRUCTIONS, the compiler maps this function to texldd.

See also

Intrinsic Functions (DirectX HLSL)

 

 

Community Additions

ADD
Show:
© 2014 Microsoft