From 3c78dd29a752e3273f8e18ed7c41cccff249c797 Mon Sep 17 00:00:00 2001 From: medievil1 <38597905+medievil1@users.noreply.github.com> Date: Sun, 11 Sep 2022 13:22:29 -0400 Subject: [PATCH] correct mod instruction --- src/core/hle/D3D8/Direct3D9/CxbxPixelShaderTemplate.hlsl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/hle/D3D8/Direct3D9/CxbxPixelShaderTemplate.hlsl b/src/core/hle/D3D8/Direct3D9/CxbxPixelShaderTemplate.hlsl index 1268df0dc8..988ddd5db9 100644 --- a/src/core/hle/D3D8/Direct3D9/CxbxPixelShaderTemplate.hlsl +++ b/src/core/hle/D3D8/Direct3D9/CxbxPixelShaderTemplate.hlsl @@ -117,7 +117,7 @@ R"DELIMITER( #ifdef PS_COMBINERCOUNT_MUX_MSB #define FCS_MUX (r0.a >= 0.5) // Check r0.a MSB; Having range upto 1 this should be equal to : (((r0.a * 255) /*mod 256*/) >= 128) #else // PS_COMBINERCOUNT_MUX_LSB - #define FCS_MUX (((r0.a * 255) mod 2) >= 1) // Check r0.b LSB; Get LSB by converting 1 into 255 (highest 8-bit value) and using modulo 2. TODO : Verify correctness + #define FCS_MUX (((r0.a * 255) % 2) >= 1) // Check r0.b LSB; Get LSB by converting 1 into 255 (highest 8-bit value) and using modulo 2. TODO : Verify correctness #endif // PS_FINALCOMBINERSETTING_COMPLEMENT_V1, when defined, applies a modifier to the v1 input when calculating the sum register