mirror of
https://github.com/yuzu-emu/FasTC
synced 2024-11-23 02:33:43 +00:00
If the intensity is greater than one, then we're treating it as a float value, so when packing it into a pixel, just pack the value instead of scaling it to 255...
This commit is contained in:
parent
d3fd98c8fa
commit
68f2f4a8b3
1 changed files with 5 additions and 1 deletions
|
@ -62,7 +62,11 @@ namespace FasTC {
|
|||
uint32 IPixel::Pack() const {
|
||||
uint32 ret = 0xFF << 24;
|
||||
for(uint32 i = 0; i < 3; i++) {
|
||||
ret |= static_cast<uint32>((255.0 * vec[0]) + 0.5f) << i*8;
|
||||
if(vec[0] > 1.0) {
|
||||
ret |= static_cast<uint32>(vec[0]) << i*8;
|
||||
} else {
|
||||
ret |= static_cast<uint32>((255.0 * vec[0]) + 0.5f) << i*8;
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue