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

Migrate reflection probes to required components #15737

Merged

Conversation

Jondolf
Copy link
Contributor

@Jondolf Jondolf commented Oct 8, 2024

Objective

Getting closer to the end! Another part of the required components migration: reflection probes.

Solution

As per the proposal added by Cart (Proposal 2), make LightProbe require Transform and Visibility, and deprecate ReflectionProbeBundle.

Note that this proposal wasn't officially blessed yet, but it is the only existing one that really works, so I implemented it here for consideration.

Testing

I ran the reflection probe example, and it appears to work.


Migration Guide

ReflectionProbeBundle has been deprecated in favor of inserting the LightProbe and EnvironmentMapLight components directly. Inserting them will now automatically insert Transform and Visibility components.

@Jondolf Jondolf added A-Rendering Drawing game state to the screen A-ECS Entities, components, systems, and events S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Oct 8, 2024
@Jondolf Jondolf requested a review from cart October 8, 2024 17:22
@Jondolf Jondolf added this to the 0.15 milestone Oct 8, 2024
Comment on lines +140 to +143
#[deprecated(
since = "0.15.0",
note = "Use the `LightProbe` and `EnvironmentMapLight` components instead. Inserting them will now also insert the other components required by them automatically."
)]
Copy link
Contributor Author

@Jondolf Jondolf Oct 8, 2024

Choose a reason for hiding this comment

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

Question: Do we actually want to deprecate this yet, considering you still need to add both components manually? Or should I only remove the spatial_bundle here?

Copy link
Contributor

Choose a reason for hiding this comment

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

Definitely unfortunate that the EnvironmentMapLight component is also used on camera entities. Looking at the examples it feels like that should be merged into the Skybox component. We could then require LightProbe for EnvironmentMapLight, but alas.

I think we should deprecate this, even though it's not perfect

Copy link
Contributor

Choose a reason for hiding this comment

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

What do you mean by "also used on camera entities". Where else other than camera entities is it used?

Co-authored-by: Tim Blackbird <[email protected]>
@bushrat011899 bushrat011899 added S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it and removed S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Oct 8, 2024
auto-merge was automatically disabled October 8, 2024 23:45

Head branch was pushed to by a user without write access

@Jondolf
Copy link
Contributor Author

Jondolf commented Oct 8, 2024

@alice-i-cecile attempt number two?

@alice-i-cecile alice-i-cecile added this pull request to the merge queue Oct 8, 2024
Merged via the queue into bevyengine:main with commit bc35256 Oct 9, 2024
26 checks passed
@Jondolf Jondolf deleted the reflection-probes-required-components branch October 9, 2024 00:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-ECS Entities, components, systems, and events A-Rendering Drawing game state to the screen S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

5 participants