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.

CalculateLevelOfDetail (DirectX HLSL Texture Object)

Calculates the level of detail.

ret Object.CalculateLevelOfDetail(

sampler_state S,

float x

);

 

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.

x

[in] The linear interpolation value or values, which is a floating-point number between 0.0 and 1.0 inclusive. The number of components is dependent on the texture-object type.

Texture-Object TypeParameter Type
Texture1D, Texture1DArrayfloat1
Texture2D, Texture2DArrayfloat2
Texture3D, TextureCube, TextureCubeArray¹float3

 

 

Return Value

Returns the calculated LOD, a single floating-point value.

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²
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.

Related topics

Texture-Object

 

 

Show:
© 2017 Microsoft