Skip to content

Commit

Permalink
Merge pull request Cxbx-Reloaded#2397 from medievil1/new-master
Browse files Browse the repository at this point in the history
correct mod instruction
  • Loading branch information
LukeUsher authored Sep 11, 2022
2 parents 42ff76c + 3c78dd2 commit 4204640
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/hle/D3D8/Direct3D9/CxbxPixelShaderTemplate.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4204640

Please sign in to comment.