mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-27 15:30:35 +00:00
softgpu: Allow inversions when w >= -1.0.
This seems to match desired cases well, see #16131. Likely still inaccurate to what hardware actually does.
This commit is contained in:
parent
0b375bb357
commit
909f3feaea
@ -50,13 +50,16 @@ inline float clip_dotprod(const ClipVertexData &vert, float A, float B, float C,
|
||||
}
|
||||
|
||||
inline void clip_interpolate(ClipVertexData &dest, float t, const ClipVertexData &a, const ClipVertexData &b) {
|
||||
dest.Lerp(t, a, b);
|
||||
if (different_signs(a.clippos.w, b.clippos.w)) {
|
||||
dest.v.screenpos.x = 0x7FFFFFFF;
|
||||
} else {
|
||||
dest.v.screenpos = TransformUnit::ClipToScreen(dest.clippos);
|
||||
dest.v.clipw = dest.clippos.w;
|
||||
if (a.clippos.w < -1.0f || b.clippos.w < -1.0f) {
|
||||
dest.v.screenpos.x = 0x7FFFFFFF;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
dest.Lerp(t, a, b);
|
||||
dest.v.screenpos = TransformUnit::ClipToScreen(dest.clippos);
|
||||
dest.v.clipw = dest.clippos.w;
|
||||
}
|
||||
|
||||
#define CLIP_POLY( PLANE_BIT, A, B, C, D ) \
|
||||
|
Loading…
Reference in New Issue
Block a user