Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Software renderer clips/culls incorrectly #9622

Closed
unknownbrackets opened this issue Apr 16, 2017 · 2 comments
Closed

Software renderer clips/culls incorrectly #9622

unknownbrackets opened this issue Apr 16, 2017 · 2 comments

Comments

@unknownbrackets
Copy link
Collaborator

See #9620. This is evident in the first-person modes of Persona 1 - various parts of drawing are culled.

Disabling the outside_range_flag culling doesn't fix it, but disabling the clipping in ProcessTriangle does (but also adds other artifacts, maybe things should be clipped or maybe things are wrapping - not clear.) This suggests it's a clipping problem of some sort.

-[Unknown]

@unknownbrackets
Copy link
Collaborator Author

Some affected games:

  • ATV Offroad Fury Pro (ground behind bike)
  • Gods Eater Burst (in corridor near room)
  • Persona 1 (first-person modes)
  • Kingdom Hearts: Birth by Sleep (ground)
  • Sword Art Online (I think; when passing by buildings)
  • Ys Seven (i.e. lava)
  • 3rd Birthday (somewhat rarely)
  • Wipeout Pure (track behind car)

-[Unknown]

@unknownbrackets
Copy link
Collaborator Author

In Persona 1, things look better if BOTH outside_range_flag is skipped, AND the complete cull on mask & CLIP_NEG_Z_BIT is skipped.

Dropped coords are similar to (7187.356445, 4103.426758, 65535) and (7187.356445, 7186.999023, 65535), which apparently should be clipped and drawn.

During such draws:

  • Clipping flag (which almost seems to control depth clamp only?) is enabled
  • Cullface is enabled (cull = back)
  • Drawn in transform mode (u8 tc / float norm / s16 pos)
  • Region and scissor are set to standard values
  • Min/max Z: 0x1000 - 0xffff
  • Viewport is fairly standard, except depth which is 34815 +/- -30719.5
  • Offset is standard
  • Primitive is triangle strip with four verts (so both triangles discarded if the vert is marked invalid)

-[Unknown]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant