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

[Merged by Bors] - Directional light #2112

Closed
wants to merge 12 commits into from
Closed

[Merged by Bors] - Directional light #2112

wants to merge 12 commits into from

Conversation

msklywenn
Copy link
Contributor

This PR adds a DirectionalLight component to bevy_pbr.

msklywenn added 3 commits May 5, 2021 22:41
# Conflicts:
#	crates/bevy_pbr/src/lib.rs
# Conflicts:
#	crates/bevy_pbr/src/lib.rs
@alice-i-cecile alice-i-cecile added C-Feature A new feature, making something new possible A-Rendering Drawing game state to the screen labels May 6, 2021
crates/bevy_pbr/src/light.rs Outdated Show resolved Hide resolved
@cart
Copy link
Member

cart commented May 7, 2021

I think this is good to merge once we resolve the nits above. Good work!

@msklywenn msklywenn marked this pull request as ready for review May 9, 2021 09:23
@cart
Copy link
Member

cart commented May 14, 2021

I think this is good to go. We might want to make units configurable (ex: unreal does this). It feels a little odd having PointLight using "intensity" and DirectionalLight having "illuminance", but I'm totally cool with having that discussion later.

@cart
Copy link
Member

cart commented May 14, 2021

bors r+

bors bot pushed a commit that referenced this pull request May 14, 2021
This PR adds a `DirectionalLight` component to bevy_pbr.
@bors bors bot changed the title Directional light [Merged by Bors] - Directional light May 14, 2021
@bors bors bot closed this May 14, 2021
@msklywenn msklywenn deleted the directional_light branch May 16, 2021 10:06
bors bot pushed a commit that referenced this pull request May 17, 2021
Fixes the frag shader for unlit materials by correcting the scope of the `#ifndef` to include the light functions. Closes #2190, introduced in #2112.

Tested by changing materials in the the `3d_scene` example to be unlit. Unsure how to prevent future regressions without creating a test case scene that will catch these runtime panics.
ostwilkens pushed a commit to ostwilkens/bevy that referenced this pull request Jul 27, 2021
This PR adds a `DirectionalLight` component to bevy_pbr.
ostwilkens pushed a commit to ostwilkens/bevy that referenced this pull request Jul 27, 2021
Fixes the frag shader for unlit materials by correcting the scope of the `#ifndef` to include the light functions. Closes bevyengine#2190, introduced in bevyengine#2112.

Tested by changing materials in the the `3d_scene` example to be unlit. Unsure how to prevent future regressions without creating a test case scene that will catch these runtime panics.
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-Feature A new feature, making something new possible
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants