sample_c_lz (sm4 - asm)

Performs a comparison filter. This instruction behaves like sample_c, except LOD is 0, and derivatives are ignored.

sample_c_lz[_aoffimmi(u,v,w)] dest[.mask], srcAddress[.swizzle], srcResource.r, // must be .r swizzle srcSampler, srcReferenceValue // single component selected

 

ItemDescription

dest

[in] The address of the results of the operation.

srcAddress

[in] A set of texture coordinates. For more information see the sample instruction.

srcResource

[in] A texture register. For more information see the sample instruction.

srcSampler

[in] A sampler register. For more information see the sample instruction.

srcReferenceValue

[in] A register with a single component selected, which is used in the comparison.

 

Remarks

The "lz" stands for level-zero. Because derivatives are ignored, this instruction is available in shaders other than the Pixel Shader.

If this instruction is used with a mipmapped texture, LOD 0 gets sampled, unless the sampler has an LOD clamp which places the LOD somewhere else, or if there is an LOD Bias, which would simply bias starting from 0. Because derivatives are ignored, anisotropic filtering behaves as isotropic filtering.

In Pixel Shaders, this instruction can be used inside varying flow control when the texture coordinates are derived in the shader, unlike sample_c.

Fetching from an input slot that has nothing bound to it returns 0 for all components.

This instruction is available in all shaders, not just the Pixel Shader, for consistency.

Vertex ShaderGeometry ShaderPixel Shader
XXx

 

Minimum Shader Model

This function is supported in the following shader models.

Shader ModelSupported
Shader Model 5 yes
Shader Model 4.1 yes
Shader Model 4 yes
Shader Model 3 (DirectX HLSL) no
Shader Model 2 (DirectX HLSL) no
Shader Model 1 (DirectX HLSL) no

 

 

 

Community Additions

ADD
Show:
© 2014 Microsoft