mirror of
https://github.com/yuzu-emu/FasTC.git
synced 2025-01-09 14:45:39 +00:00
Some compilers treat hex literals as unsigned, which causes problems
This commit is contained in:
parent
b6fde9c3f5
commit
7359f9e758
|
@ -1016,10 +1016,11 @@ double BC7CompressionMode::CompressCluster(
|
||||||
a2 = std::min(255.0f, std::max(0.0f, a2));
|
a2 = std::min(255.0f, std::max(0.0f, a2));
|
||||||
|
|
||||||
// Quantize
|
// Quantize
|
||||||
|
const int8 maskSeed = 0x80;
|
||||||
const uint8 a1b = ::QuantizeChannel(
|
const uint8 a1b = ::QuantizeChannel(
|
||||||
uint8(a1), (0x80 >> (GetAlphaChannelPrecision() - 1)));
|
uint8(a1), (maskSeed >> (GetAlphaChannelPrecision() - 1)));
|
||||||
const uint8 a2b = ::QuantizeChannel(
|
const uint8 a2b = ::QuantizeChannel(
|
||||||
uint8(a2), (0x80 >> (GetAlphaChannelPrecision() - 1)));
|
uint8(a2), (maskSeed >> (GetAlphaChannelPrecision() - 1)));
|
||||||
|
|
||||||
// Compute error
|
// Compute error
|
||||||
alphaError = 0.0;
|
alphaError = 0.0;
|
||||||
|
|
Loading…
Reference in a new issue