logp - vs
Partial precision logp₂(x).
Syntax
logp dst, src |
---|
where
- dst is the destination register.
- src is a source register. Source register requires explicit use of replicate swizzle, that is, exactly one of the .x, .y, .z, .w swizzle components (or the .r, .g, .b, .a equivalents) must be specified.
Remarks
Vertex shader versions | 1_1 | 2_0 | 2_x | 2_sw | 3_0 | 3_sw |
---|---|---|---|---|---|---|
logp | x | x | x | x | x | x |
The following code fragment shows the operations performed.
float f = abs(src);
if (f != 0)
dest.x = dest.y = dest.z = dest.w = (float)(log(f)/log(2));
else
dest.x = dest.y = dest.z = dest.w = -FLT_MAX;
This instruction provides logarithm base 2 partial precision, up to 10 bits.
Related topics
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for