-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Move Msaa
to component
#14273
Move Msaa
to component
#14273
Conversation
Switches `Msaa` from being a globally configured resource to a per camera view component. Closes bevyengine#7194
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good once you fix the failing CI.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These changes look correct to me. I always found it strange that MSAA is global, especially since having different settings on different cameras could be very useful, for example having MSAA on a camera that just sees objects with sharp outlines and using something blurrier but cheaper for the rest.
Did you test this with multiple cameras with different MSAA modes? Iirc there are some pipeline properties that depend on it, so things might break if multiple levels are enabled at once.
Here's a simple patch that might help alleviate the problem of having the proliferation of main textures be confusing to users who want to run split screen setups: #14287. |
the mobile example needs to be updated, or this will fail merging on android compilation |
Head branch was pushed to by a user without write access
Co-authored-by: François Mockers <[email protected]>
Should be fixed now. This PR also removes the more advanced per-window feature detection. I'd be happy to add that back in but wasn't sure where exactly it should go. |
I think some things were missed here. Iirc in TAA plugin docs and meshlet plugin docs, it mentions that it automatically disabled MSAA, which is no longer true. |
Minor doc fixes missed in #14273
# Objective - #14273 changed MSAA to a component, and broke some examples - SSAO needs MSAA to be disabled https://github.com/bevyengine/bevy/blob/f0ff7fb5445996e561d9ea336ee353544d79fef6/crates/bevy_pbr/src/ssao/mod.rs#L495 - `AlphaMode::AlphaToCoverage` needs MSAA to be not off to do something https://github.com/bevyengine/bevy/blob/f0ff7fb5445996e561d9ea336ee353544d79fef6/examples/3d/transparency_3d.rs#L113-L117 # Solution - change MSAA in those examples
# Objective - meshlet example has broken since #14273 ## Solution - disable msaa in meshlet example Co-authored-by: François Mockers <[email protected]>
# Objective #14273 changed `Msaa` to be a component rather than a resource. However, the documentation still says that it is a resource. This tripped me up during migration to 0.15 until I looked at the type definition. Additionally, the docs have some unnecessary repetition and some grammar mistakes, and they don't link to camera documentation. ## Solution Fix up the docs!
# Objective #14273 changed `Msaa` to be a component rather than a resource. However, the documentation still says that it is a resource. This tripped me up during migration to 0.15 until I looked at the type definition. Additionally, the docs have some unnecessary repetition and some grammar mistakes, and they don't link to camera documentation. ## Solution Fix up the docs!
Switches
Msaa
from being a globally configured resource to a per camera view component.Closes #7194
Objective
Allow individual views to describe their own MSAA settings. For example, when rendering to different windows or to different parts of the same view.
Solution
Make
Msaa
a component that is required on all camera bundles.Testing
Ran a variety of examples to ensure that nothing broke.
TODO:
extract_windows
.Migration Guide
Msaa
is no longer configured as a global resource, and should be specified on each spawned camera if a non-default setting is desired.