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

[FIX] Handle inf on windows correctly #3293

Merged
merged 1 commit into from Jul 5, 2021

Conversation

slimbuck
Copy link
Member

@slimbuck slimbuck commented Jul 5, 2021

Fixes an issue where reflective materials were rendering incorrectly on windows and linux.

The cause was a difference in the result of a shader multiplication when one of the operands are infinity. On mac and mobile 0.0 * inf == 0, but on windows and linux not (presumably infinity propagates or result is nan).

The fix is to test for this case upfront.

I confirm I have read the contributing guidelines and signed the Contributor License Agreement.

@slimbuck slimbuck added bug area: graphics Graphics related issue labels Jul 5, 2021
@slimbuck slimbuck requested a review from a team July 5, 2021 11:36
@slimbuck slimbuck self-assigned this Jul 5, 2021
@slimbuck slimbuck merged commit 0c4eb9e into playcanvas:master Jul 5, 2021
@slimbuck slimbuck deleted the windows-fix branch July 5, 2021 13:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: graphics Graphics related issue bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants