Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

SampleBias (DirectX HLSL Texture Object)

Samples a texture, after applying the input bias to the mipmap level.

DXGI_FORMAT Object.SampleBias(

sampler_state S,

float Location,

float Bias

[, int Offset]

);

 

Parameters

ItemDescription

Object

Any texture-object type (except Texture2DMS and Texture2DMSArray).

S

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

Location

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

Texture-Object TypeParameter Type
Texture1Dfloat
Texture1DArray, Texture2Dfloat2
Texture2DArray, Texture3D, TextureCubefloat3
TextureCubeArray¹float4

 

Bias

[in] The bias value, which is a floating-point number between 0.0 and 1.0 inclusive, is applied to a mip level before sampling.

Offset

[in] An optional texture coordinate offset, which can be used for any texture-object types. The offset is applied to the location before sampling. The argument type is dependent on the texture-object type. For more info, see Applying Integer Offsets).

Texture-Object TypeParameter Type
Texture1D, Texture1DArrayint
Texture2D, Texture2DArrayint2
Texture3Dint3
TextureCube, TextureCubeArray¹not supported

 

 

Return Value

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

Minimum Shader Model

This function is supported in the following shader models.

vs_4_0vs_4_1²ps_4_0ps_4_1²gs_4_0gs_4_1²
xx

 

  1. TextureCubeArray is available in Shader Model 4.1 or higher.
  2. Shader Model 4.1 is available in Direct3D 10.1 or higher.

Related topics

Texture-Object

 

 

Show:
© 2017 Microsoft