Skip to content

Latest commit

 

History

History
143 lines (87 loc) · 3.32 KB

tcube-samplegrad-s-float-float-float-float-.md

File metadata and controls

143 lines (87 loc) · 3.32 KB
title description ms.assetid keywords topic_type api_name api_type ms.topic ms.date api_location
SampleGrad::SampleGrad(S,float,float,float,float) function for TextureCube
Samples a texture, using a gradient to influence the way the sample location is calculated, with an optional value to clamp sample level-of-detail (LOD) values to. For TextureCube
C5BC71FA-63E3-4DE2-9202-B9C79789AE8E
SampleGrad function HLSL
apiref
SampleGrad
NA
reference
05/31/2018

SampleGrad::SampleGrad(S,float,float,float,float) function for TextureCube

Samples a texture, using a gradient to influence the way the sample location is calculated, with an optional value to clamp sample level-of-detail (LOD) values to.

Syntax

DXGI_FORMAT SampleGrad(
  in SamplerState S,
  in float        Location,
  in float        DDX,
  in float        DDY,
  in float        Clamp
);

Parameters

S [in]

Type: SamplerState

A Sampler state. This is an object declared in an effect file that contains state assignments.

Location [in]

Type: float

The texture coordinates. The argument type is dependent on the texture-object type.

Texture-Object Type Parameter Type
Texture1D float
Texture1DArray, Texture2D float2
Texture2DArray, Texture3D, TextureCube float3
TextureCubeArray float4

 

DDX [in]

Type: float

The rate of change of the surface geometry in the x direction. The argument type is dependent on the texture-object type.

Texture-Object Type Parameter Type
Texture1D, Texture1DArray float
Texture2D, Texture2DArray float2
Texture3D, TextureCube, TextureCubeArray float3
Texture2DMS, Texture2DMSArray not supported

 

DDY [in]

Type: float

The rate of change of the surface geometry in the y direction. The argument type is dependent on the texture-object type.

Texture-Object Type Parameter Type
Texture1D, Texture1DArray float
Texture2D, Texture2DArray float2
Texture3D, TextureCube, TextureCubeArray float3
Texture2DMS, Texture2DMSArray not supported

 

Clamp [in]

Type: float

An optional value to clamp sample LOD values to. For example, if you pass 2.0f for the clamp value, you ensure that no individual sample accesses a mip level less than 2.0f.

Return value

Type: DXGI_FORMAT

The texture format, which is one of the typed values listed in DXGI_FORMAT.

See also

SampleGrad methods

TextureCube