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

Fixes dual-side lighting #2644

Merged
merged 4 commits into from Jul 22, 2014
Merged

Conversation

JakubValtar
Copy link
Contributor

Fixes #2014, fixes #2018. Lighting is computed twice in vertex shader and one of the two colors is chosen in fragment shader, which has information whether the fragment is facing front or back. Polygons are expected to be specified by user in CW order in left handed coordinate system (X extends to the right, Y extends downwards, Z extends towards the camera). Normals are expected to extend from front faces.

Bonus: more robust arc implementation which also displays CHORD and OPEN correctly. Distribustion of light on the surface might not be perfect since for these two modes the center of triangle fan is moved to the side, but it is not very noticeablce.

codeanticode added a commit that referenced this pull request Jul 22, 2014
@codeanticode codeanticode merged commit 6e84674 into processing:master Jul 22, 2014
@JakubValtar JakubValtar deleted the lighting-fix branch July 23, 2014 12:48
@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants