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] - add Visibility for lights #3958

Closed
wants to merge 24 commits into from

Conversation

robtfm
Copy link
Contributor

@robtfm robtfm commented Feb 15, 2022

Objective

Add Visibility for lights

Solution

  • add Visibility to PointLightBundle and DirectionLightBundle
  • filter lights used by Visibility.is_visible

note: includes changes from #3916 due to overlap, will be cleaner after that is merged

@github-actions github-actions bot added the S-Needs-Triage This issue needs to be labelled label Feb 15, 2022
@alice-i-cecile alice-i-cecile added A-Rendering Drawing game state to the screen C-Performance A change motivated by improving speed, memory usage or compile times C-Usability A targeted quality-of-life change that makes Bevy easier to use C-Feature A new feature, making something new possible and removed S-Needs-Triage This issue needs to be labelled C-Usability A targeted quality-of-life change that makes Bevy easier to use labels Feb 15, 2022
Copy link
Contributor

@superdump superdump left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this LGTM when #3916 is merged. I'll re-check it once that has been.

@robtfm robtfm force-pushed the light_visibility branch from 1ffca21 to 0a46ae7 Compare March 1, 2022 11:44
crates/bevy_pbr/src/light.rs Show resolved Hide resolved
@IceSentry
Copy link
Contributor

I think this needs a bit of documentation. What does it mean to make a light not visible? For me it would imply that there's some sort of entity being rendered at the position of a point light. Obviously this is not what is going on here, but I'm honestly just not sure what it does.

@superdump
Copy link
Contributor

I think this needs a bit of documentation. What does it mean to make a light not visible? For me it would imply that there's some sort of entity being rendered at the position of a point light. Obviously this is not what is going on here, but I'm honestly just not sure what it does.

It enables/disable the light source. Turns it on/off. Makes its light visible/not. I agree is not the most intuitive component naming and I agree some documentation would be good.

I don’t want to get into the weeds of the whole ‘what should we use bevy-wide for an active/inactive, enabled/disabled, etc component that is discoverable by an editor?’ discussion here. In my opinion, that is a separate discussion and Visibility is ok for this for now. Sorry if I sound harsh with this response, it’s not directed at anyone in particular, I just think it’s an isolated question that should be taken on its own and addressed everywhere rather than having it hold up any PR that wants enable/disable functionality. People are welcome to disagree but then I think taking a decision and enacting it must be a very high priority.

Copy link
Contributor

@IceSentry IceSentry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Taking into consideration what @superdump said. I think just adding a short doc comment on the property is more than enough for this PR.

crates/bevy_pbr/src/bundle.rs Show resolved Hide resolved
crates/bevy_pbr/src/bundle.rs Show resolved Hide resolved
robtfm and others added 2 commits March 2, 2022 09:03
Co-authored-by: Charles <IceSentry@users.noreply.github.com>
@superdump superdump added the S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it label Mar 2, 2022
@mockersf
Copy link
Member

mockersf commented Mar 5, 2022

bors r+

bors bot pushed a commit that referenced this pull request Mar 5, 2022
# Objective

Add Visibility for lights

## Solution

- add Visibility to PointLightBundle and DirectionLightBundle
- filter lights used by Visibility.is_visible

note: includes changes from #3916 due to overlap, will be cleaner after that is merged
@bors bors bot changed the title add Visibility for lights [Merged by Bors] - add Visibility for lights Mar 5, 2022
@bors bors bot closed this Mar 5, 2022
kurtkuehnert pushed a commit to kurtkuehnert/bevy that referenced this pull request Mar 6, 2022
# Objective

Add Visibility for lights

## Solution

- add Visibility to PointLightBundle and DirectionLightBundle
- filter lights used by Visibility.is_visible

note: includes changes from bevyengine#3916 due to overlap, will be cleaner after that is merged
aevyrie pushed a commit to aevyrie/bevy that referenced this pull request Jun 7, 2022
# Objective

Add Visibility for lights

## Solution

- add Visibility to PointLightBundle and DirectionLightBundle
- filter lights used by Visibility.is_visible

note: includes changes from bevyengine#3916 due to overlap, will be cleaner after that is merged
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 C-Performance A change motivated by improving speed, memory usage or compile times S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants