Skip to content

Commit

Permalink
Update cVideoProcessing.fxh
Browse files Browse the repository at this point in the history
  • Loading branch information
papadanku committed Mar 28, 2024
1 parent 0b1e1b4 commit d1ea99f
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions shaders/shared/cVideoProcessing.fxh
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,10 @@
const int SignificandBits = 10;

const int Bias = -15;
const int Exponent = exp2(ExponentBits);
const int Significand = exp2(SignificandBits);

const int Exponent = 1 << ExponentBits;
const int Significand = 1 << SignificandBits;

const float MaxExponent = (Exponent - (1 << 1)) + Bias;
const float MaxExponent = (Exponent - exp2(1)) + Bias;
const float MaxSignificand = 1.0 + float((Significand - 1.0) / Significand);

return pow(-1, SignBit) * exp2(MaxExponent) * MaxSignificand;
Expand Down

0 comments on commit d1ea99f

Please sign in to comment.