Skip to content

Make IrradianceVolume require LightProbe (and document this). #19621

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
merged 2 commits into from
Jun 13, 2025

Conversation

kpreid
Copy link
Contributor

@kpreid kpreid commented Jun 13, 2025

Objective

Make it easier to use IrradianceVolume with fewer ways to silently fail. Fix #19614.

Solution

  • Add #[require(LightProbe)] to struct IrradianceVolume.
  • Document this fact.
  • Also document the volume being centered on the origin by default (this was the other thing that was unclear when getting started).

I also looked at the other implementor of LightProbeComponent, EnvironmentMapLight, but it has a use which is not as a light probe, so it should not require LightProbe.

Testing

  • Confirmed that examples/3d/irradiance_volumes.rs still works after removing LightProbe.
  • Reviewed generated documentation.

kpreid added 2 commits June 13, 2025 09:17
This is consistent with Bevy’s other treatments of cubes but still
should be documented rather than implied.
@alice-i-cecile alice-i-cecile requested a review from pcwalton June 13, 2025 16:44
@IceSentry IceSentry added the A-Rendering Drawing game state to the screen label Jun 13, 2025
@IceSentry IceSentry added the S-Needs-Review Needs reviewer attention (from anyone!) to move forward label Jun 13, 2025
@alice-i-cecile alice-i-cecile added C-Usability A targeted quality-of-life change that makes Bevy easier to use 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 Jun 13, 2025
@alice-i-cecile alice-i-cecile added this pull request to the merge queue Jun 13, 2025
Merged via the queue into bevyengine:main with commit ce3db84 Jun 13, 2025
41 checks passed
@kpreid kpreid deleted the irradiance branch June 13, 2025 18:12
hukasu pushed a commit to hukasu/bevy that referenced this pull request Jun 15, 2025
…vyengine#19621)

## Objective

Make it easier to use `IrradianceVolume` with fewer ways to silently
fail. Fix bevyengine#19614.

## Solution

* Add `#[require(LightProbe)]` to `struct IrradianceVolume`.
* Document this fact.
* Also document the volume being centered on the origin by default (this
was the other thing that was unclear when getting started).

I also looked at the other implementor of `LightProbeComponent`,
`EnvironmentMapLight`, but it has a use which is *not* as a light probe,
so it should not require `LightProbe`.

## Testing

* Confirmed that `examples/3d/irradiance_volumes.rs` still works after
removing `LightProbe`.
* Reviewed generated documentation.
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-Usability A targeted quality-of-life change that makes Bevy easier to use 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.

IrradianceVolume has undocumented dependency on LightProbe to be functional
3 participants