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

Detect decals after scaling happens, use glPolygonOffset instead of m… #74

Merged
merged 2 commits into from
Jun 11, 2020

Conversation

assertivist
Copy link
Member

…essing with the depth buffer by hand

To my eyes, it fixes #26, at least I don't see it in all the usual places. This, unlike other things I've tried, does the job without distorting the rendering of ramps and other 'thin' objects that don't really need adjustment. That could also be due to the improvement on how the 'thin' objects are detected, I wasn't waiting until after the geometry had been put into its final scale. glPolygonOffset worked suspiciously well to fix this with whatever values I tried in it

@rherriman
Copy link
Member

There are some lingering issues with this, at least on my machine. @assertivist has been unable to reproduce this specific issue, but occasionally faux shadows are still disappearing, seemingly when the camera is nearing a perpendicular viewing angle to them.

eulogy-no-shadow

eulogy-shadow

Occasionally decals are still not visible in the overhead view before the game begins. I can reproduce this reliably on Eulogy. Interestingly, adjusting the game resolution to a 4:3 aspect ratio makes them appear again.

That said, this is still a very significant improvement on the linked issue. Works for me.

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.

Z-fighting/moire patterns when rendering thin blocks used for coloring
2 participants