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 potential bug when using multiple lights. #1055

Merged
merged 1 commit into from
Dec 31, 2020
Merged

Fix potential bug when using multiple lights. #1055

merged 1 commit into from
Dec 31, 2020

Conversation

OptimisticPeach
Copy link
Contributor

If multiple lights are close enough to the normal line and if any value in the albedo is sufficiently high, we can get values greater than 1.0 on o_Target. This will average the influence of all of the lights.

If PBR will be delayed by much more, it may be worthwhile to add a distance based weighted average.

@Moxinilian Moxinilian added C-Bug An unexpected or incorrect behavior A-Rendering Drawing game state to the screen labels Dec 15, 2020
@cart
Copy link
Member

cart commented Dec 22, 2020

This doesn't work as expected with no lights. Everything is pure-white instead of using the AmbientColor value

@OptimisticPeach
Copy link
Contributor Author

Whoops! I mixed up max and min by accident, that's fixed now, and it should work!

@cart cart merged commit f71dc5d into bevyengine:master Dec 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Rendering Drawing game state to the screen C-Bug An unexpected or incorrect behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants