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

Re-enables back face culling #222

Merged
merged 1 commit into from
Nov 1, 2022
Merged

Re-enables back face culling #222

merged 1 commit into from
Nov 1, 2022

Conversation

dethrace-labs
Copy link
Owner

@dethrace-labs dethrace-labs commented Oct 26, 2022

The cause of #187 is weird track geometry where two back-facing triangles with no texture are laid on top of two front-facing textured triangles. The OG game culls the back-facing triangle, so it is not visible in game. (Ref: https://twitter.com/toshiba_3/status/1584152161386389504?s=20&t=g1bQ8KAAtKvn2zy1Qw6PUw)

image

As we are not culling, we render the back facing triangles, which causes the appearance of a missing texture in that part of the track!

We originally removed culling because it caused sides of streetlight poles to be invisible when viewed from the rear. Since then, we fixed/implemented RemoveDoubleSided which causes every face with a BR_MATF_TWO_SIDED material to be duplicated and faced backwards. We can now cull back faces without any apparent graphical issues.

Fixes: #187

Copy link
Collaborator

@madebr madebr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hurray! Less triangles to draw!

@dethrace-labs
Copy link
Owner Author

Yep, its win-win 🎉

@dethrace-labs dethrace-labs merged commit a86a04f into main Nov 1, 2022
@dethrace-labs dethrace-labs deleted the fix-187 branch November 1, 2022 07:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing texture on Mayan Mayhem track
2 participants