log (sm4 - asm)

Component-wise log base 2.

log[_sat] dest[.mask], [-]src0[_abs][.swizzle

 

ItemDescription

dest

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

dest = log2(src0)

src0

[in] The value for the operation.

 

Remarks

Restrictions

  • Follows limit theory.
  • Error tolerance: If src0 is [0.5..2], absolue error must be no more than 2-21. If src0 is (0..0.5) or (2..+INF], relative error must be no more than 2-21.

The following table shows the results obtained when executing the instruction with various classes of numbers, assuming that neither overflow or underflow occurs. F means finite-real number.

src-inf-F-denorm-0+0+denorm+F+infNaN
destNaNNaN-inf-inf-inf-infF+infNaN

 

This instruction applies to the following shader stages:

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

 

Related topics

Shader Model 4 Assembly (DirectX HLSL)

 

 

Show: