softgpu: Cull verts outside post-viewport Z.

Shouldn't have removed this before, points are still culled when depth
clamp is off and throughmode is off.

Fixes Crazy Taxi graphics glitches.
This commit is contained in:
Unknown W. Brackets 2022-12-01 21:56:05 -08:00
parent 7f65ba115b
commit c5a98e62dd

View file

@ -181,7 +181,7 @@ static ScreenCoords ClipToScreenInternal(Vec3f scaled, const ClipCoords &coords,
scaled.z = 0.f;
else if (scaled.z > 65535.0f)
scaled.z = 65535.0f;
} else if (scaled.x > SCREEN_BOUND || scaled.y >= SCREEN_BOUND || scaled.x < 0 || scaled.y < 0) {
} else if (scaled.x > SCREEN_BOUND || scaled.y >= SCREEN_BOUND || scaled.x < 0 || scaled.y < 0 || scaled.z < 0.0f || scaled.z >= 65536.0f) {
*outside_range_flag = true;
}