SampleBias (DirectX HLSL Texture Object)

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

<Template Type> Object.SampleBias( sampler_state S, float Location, float Bias [, int Offset] );

Parameters

Item Description
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 Type Parameter Type
Texture1D float
Texture1DArray, Texture2D float2
Texture2DArray, Texture3D, TextureCube float3
TextureCubeArray float4

Bias

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

Offset

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

Texture-Object Type Parameter Type
Texture1D, Texture1DArray int
Texture2D, Texture2DArray int2
Texture3D int3
TextureCube, TextureCubeArray not supported

Return Value

The texture's template type, which may be a single- or multi-component vector. The format is based on the texture's DXGI_FORMAT.

Minimum Shader Model

This function is supported in the following shader models.

vs_4_0 vs_4_1 ps_4_0 ps_4_1 gs_4_0 gs_4_1
x x
  1. TextureCubeArray is available in Shader Model 4.1 or higher.
  2. Shader Model 4.1 is available in Direct3D 10.1 or higher.

Texture-Object