dx2cg: Implement mov_sat instruction

Basically just mov but clamp the result.
https://learn.microsoft.com/en-us/windows/win32/direct3dhlsl/dx9-graphics-reference-asm-ps-instructions-modifiers-ps-2-0#saturate
This commit is contained in:
CakeLancelot 2024-02-13 03:12:19 -06:00
parent 99c80c9c7b
commit 06869164a1

View File

@ -41,6 +41,7 @@ decls = {
ops = {
"mov": "{0} = {1};",
"mov_sat": "{0} = clamp({1}, 0.0, 1.0)",
"add": "{0} = {1} + {2};",
"mul": "{0} = {1} * {2};",
"mad": "{0} = {1} * {2} + {3};",