mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-14 05:38:56 +00:00
GRIM: Fix z-depth shader rendering on big-endian hosts
The value read is done in shader on a byte basis so we must set the expected layout
This commit is contained in:
parent
89cfc283ab
commit
dda9a66f7a
@ -1275,7 +1275,9 @@ void GfxOpenGLS::createBitmap(BitmapData *bitmap) {
|
||||
if (val == 0xf81f) {
|
||||
val = 0;
|
||||
}
|
||||
zbufPtr[i] = 0xffff - ((uint32)val) * 0x10000 / 100 / (0x10000 - val);
|
||||
// This is later read as a LA pair when filling texture
|
||||
// with L being used as the LSB in fragment shader
|
||||
zbufPtr[i] = TO_LE_16(0xffff - ((uint32)val) * 0x10000 / 100 / (0x10000 - val));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user