Skip to content

Latest commit

 

History

History
127 lines (78 loc) · 3.41 KB

t1d-samplelevel-s-float-float-int-uint-.md

File metadata and controls

127 lines (78 loc) · 3.41 KB
title description ms.assetid keywords topic_type api_name api_type ms.topic ms.date api_location
SampleLevel::SampleLevel(S,float,float,int,uint) function for Texture1D
Samples a texture on the specified mipmap level and returns status about the operation. For Texture1D. | SampleLevel::SampleLevel(S,float,float,int,uint) function
B797C7F9-7436-4DD5-9CAB-EFF81D410174
SampleLevel function HLSL
apiref
SampleLevel
NA
reference
05/31/2018

SampleLevel::SampleLevel(S,float,float,int,uint) function for Texture1D

Samples a texture on the specified mipmap level and returns status about the operation.

Syntax

DXGI_FORMAT SampleLevel(
  in  SamplerState S,
  in  float        Location,
  in  float        LOD,
  in  int          Offset,
  out uint         Status
);

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

 

LOD [in]

Type: float

[in] A number that specifies the mipmap level. If the value is ≤ 0, mipmap level 0 (biggest map) is used. The fractional value (if supplied) is used to interpolate between two mipmap levels.

Offset [in]

Type: int

An optional texture coordinate offset, which can be used for any texture-object type; the offset is applied to the location before sampling. Use an offset only at an integer miplevel; otherwise, you may get results that do not translate well to hardware. The argument type is dependent on the texture-object type. For more info, see Applying Integer Offsets.

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

 

Status [out]

Type: uint

The status of the operation. You can't access the status directly; instead, pass the status to the CheckAccessFullyMapped intrinsic function. CheckAccessFullyMapped returns TRUE if all values from the corresponding Sample, Gather, or Load operation accessed mapped tiles in a tiled resource. If any values were taken from an unmapped tile, CheckAccessFullyMapped returns FALSE.

Return value

Type: DXGI_FORMAT

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

See also

SampleLevel methods