mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-26 15:53:35 +01:00
GPU: Cull rectangles more when depth clamp off.
If any vert is outside Z, it's culled when not clamping/clipping.
This commit is contained in:
1 parent
5315c404c5
commit
4ac36cb810
1 file changed
+5
-1
@@ -633,7 +633,11 @@ void SoftwareTransform::BuildDrawingParams(int prim, int vertexCount, u32 vertTy
|
||||
|
||||
// If both transformed verts are outside Z, cull this rectangle entirely.
|
||||
constexpr float outsideValue = 1.000030517578125f;
|
||||
if (fabsf(tl.z) >= outsideValue && fabsf(br.z) >= outsideValue)
|
||||
bool tlOutside = fabsf(tl.z / tl.w) >= outsideValue;
|
||||
bool brOutside = fabsf(br.z / br.w) >= outsideValue;
|
||||
if (tlOutside && brOutside)
|
||||
continue;
|
||||
if (!gstate.isDepthClampEnabled() && (tlOutside || brOutside))
|
||||
continue;
|
||||
|
||||
RotateUV(trans, tl, br, flippedY);
|
||||
|
||||
Reference in new issue
Block a user