mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
GPU: Respect depth clamp in bounding box check.
Although, logically, this feels reversed - it rejects the point if it's outside positive Z, which would clamp. This matches PSP tests.
This commit is contained in:
parent
8b80c5fb28
commit
93ee82d84f
1 changed files with 3 additions and 1 deletions
|
@ -295,7 +295,9 @@ bool DrawEngineCommon::TestBoundingBox(const void *control_points, const void *i
|
|||
Matrix4ByMatrix4(worldview, world, view);
|
||||
Matrix4ByMatrix4(worldviewproj, worldview, gstate.projMatrix);
|
||||
PlanesFromMatrix(worldviewproj, planes);
|
||||
for (int plane = 0; plane < 6; plane++) {
|
||||
// Note: near/far are not checked without clamp/clip enabled, so we skip those planes.
|
||||
int totalPlanes = gstate.isDepthClampEnabled() ? 6 : 4;
|
||||
for (int plane = 0; plane < totalPlanes; plane++) {
|
||||
int inside = 0;
|
||||
int out = 0;
|
||||
for (int i = 0; i < vertexCount; i++) {
|
||||
|
|
Loading…
Add table
Reference in a new issue