mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-01-22 13:48:34 +00:00
softgpu: Fix depth cull in softgpu.
Was improperly skipping cull for positive Z.
This commit is contained in:
parent
fe440d40e5
commit
8db2d37e64
@ -30,6 +30,7 @@ namespace Clipper {
|
||||
|
||||
enum {
|
||||
SKIP_FLAG = -1,
|
||||
CLIP_POS_Z_BIT = 0x10,
|
||||
CLIP_NEG_Z_BIT = 0x20,
|
||||
};
|
||||
|
||||
@ -37,6 +38,7 @@ static inline int CalcClipMask(const ClipCoords& v)
|
||||
{
|
||||
int mask = 0;
|
||||
// This checks `x / w` compared to 1 or -1, skipping the division.
|
||||
if (v.z > v.w) mask |= CLIP_POS_Z_BIT;
|
||||
if (v.z < -v.w) mask |= CLIP_NEG_Z_BIT;
|
||||
return mask;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user