close
Skip to content

Fix potential bug when using multiple lights.#1055

Merged
cart merged 1 commit into
bevyengine:masterfrom
OptimisticPeach:master
Dec 31, 2020
Merged

Fix potential bug when using multiple lights.#1055
cart merged 1 commit into
bevyengine:masterfrom
OptimisticPeach:master

Conversation

@OptimisticPeach
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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