Skip to content

Latest commit

 

History

History
94 lines (51 loc) · 3.43 KB

dx-graphics-hlsl-texcubegrad.md

File metadata and controls

94 lines (51 loc) · 3.43 KB
title description ms.assetid keywords topic_type api_name api_type ms.topic ms.date api_location
texCUBEgrad
Samples a cube texture using a gradient to select the mip level. | texCUBEgrad
ebc5e38a-e314-43b0-9a00-7e4147e24bf0
texCUBEgrad HLSL
apiref
texCUBEgrad
NA
reference
05/31/2018

texCUBEgrad

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

ret texCUBEgrad(s, t, ddx, ddy)

Parameters

Item Description
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

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

Minimum Shader Model

This function is supported in the following shader models.

Shader Model Supported
Shader Model 4 yes (pixel shader only)
Shader Model 3 (DirectX HLSL) yes (pixel shader only)
Shader Model 2 (DirectX HLSL) yes (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)