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

Improve clarity of lightFalloff() example #5315

Merged
merged 1 commit into from
Jul 28, 2021

Conversation

JetStarBlues
Copy link
Contributor

In the current example, the translations to place the spheres are done globally (instead of using push and pop). As a result, the light positions are affected by these translations.

As a consequence of this, the color of the rightmost sphere is affected more by the light position than by falloff.

This is what the two spheres look like in the current example if the lines setting lightFalloff() are commented out:

falloffExample_current_commentedOut

What should happen instead is that both spheres are equally lit. Here is what they look like with lightFalloff() commented out in the proposed example:

falloffExample_proposal_commentedOut

In the proposed changes (live version here), the difference between the two spheres becomes attributable to falloff only.

Change as docs:
falloffExample_proposal_docs

@stalgiag stalgiag merged commit 389c635 into processing:main Jul 28, 2021
@stalgiag
Copy link
Contributor

Great change!

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.

2 participants