VideoSoftware: Improve fog range adjustment by using less magic and more comments.

This commit is contained in:
NeoBrainX
2013-03-26 00:56:34 +01:00
parent 3ab4e35582
commit 0994a5828d
4 changed files with 30 additions and 12 deletions

View File

@ -686,8 +686,9 @@ union FogRangeKElement
u32 LO : 12;
u32 regid : 8;
};
// TODO: Which scaling coefficient should we use here? This is just a guess!
float GetValue(int i) { return (i ? HI : LO) / 32.f; }
float GetValue(int i) { return (i ? HI : LO) / 256.f; }
u32 HEX;
};
@ -697,7 +698,7 @@ struct FogRangeParams
{
struct
{
u32 Center : 10;
u32 Center : 10; // viewport center + 342
u32 Enabled : 1;
u32 unused : 13;
u32 regid : 8;