Instruction modifiers (HLSL VS reference)
Instruction modifiers affect the result of the instruction before it is written into the destination register.
_sat
Saturates (or clamps) the instruction result to [0,1] range before writing to the destination register.
For example:
add_sat dst, src0, src1
Where:
dst = clamp_between_0_and_1(src0 + src1)
The _sat instruction modifier costs no additional instruction slots.
If supported, the _sat instruction modifier can be used with any instruction except: frc - vs, sincos - vs, and texldl - vs.
Vertex shader versions | 1_1 | 2_0 | 2_x | 2_sw | 3_0 | 3_sw |
---|---|---|---|---|---|---|
_sat | x | x |
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