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

Rendering issue with triangle vertices clipped in viewport with Phong lighting #2

Open
Bigfoot71 opened this issue May 13, 2024 · 0 comments

Comments

@Bigfoot71
Copy link
Owner

There appears to be a problem with the vertices of triangles clipped within the viewport when using Phong lighting. This issue persists both in barycentric rendering mode and scanline mode.

The problem does not seem to originate from normal interpolation during clipping. In the raylib_FirstPerson example, normals consistently point towards either 1 or -1 along a single axis. Even when printing them to the console or displaying them on screen with color, everything appears normal.

I also do not see any issues with position interpolation.

This problem mostly manifests when triangles are clipped according to the viewport.


Screenshots of the issue:
screenshot1
screenshot2
screenshot3

Image rendering normals with color at locations where triangles are clipped, showing no apparent issues:
screenshot4
screenshot5

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

No branches or pull requests

1 participant