mirror of
https://github.com/libretro/ppsspp.git
synced 2024-11-24 08:39:51 +00:00
Fix debugging and depth packing with old depth.
Which means, OpenGL in general right now.
This commit is contained in:
parent
4a38a414f7
commit
8b51bc5b0b
@ -531,6 +531,10 @@ float ToScaledDepth(u16 z) {
|
||||
}
|
||||
|
||||
float FromScaledDepth(float z) {
|
||||
if (!gstate_c.Supports(GPU_SUPPORTS_ACCURATE_DEPTH)) {
|
||||
return z * 65535.0f;
|
||||
}
|
||||
|
||||
const float depthSliceFactor = DepthSliceFactor();
|
||||
const float offset = 0.5f * (depthSliceFactor - 1.0f) * (1.0f / depthSliceFactor);
|
||||
return (z - offset) * depthSliceFactor * 65535.0f;
|
||||
|
Loading…
Reference in New Issue
Block a user