-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Change defaults for Tonemapping
based on tonemapping_luts
feature
#20924
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
base: main
Are you sure you want to change the base?
Conversation
It looks like your PR is a breaking change, but you didn't provide a migration guide. Please review the instructions for writing migration guides, then expand or revise the content in the migration guides directory to reflect your changes. |
Tonemapping
based on tonemapping_luts
feature
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.
Good strategy, but please note the defaults in the docs.
@alice-i-cecile should |
Yes, I think so? |
I think this makes sense as long as the tonemapping_luts feature is on by default. Is this supposed to work in this pr? I get a bunch of errors like
|
const TONEMAP_METHOD_ACES_FITTED = 3 << Self::TONEMAP_METHOD_SHIFT_BITS; | ||
#[cfg(feature = "tonemapping_luts")] | ||
const TONEMAP_METHOD_AGX = 4 << Self::TONEMAP_METHOD_SHIFT_BITS; | ||
const TONEMAP_METHOD_SOMEWHAT_BORING_DISPLAY_TRANSFORM = 5 << Self::TONEMAP_METHOD_SHIFT_BITS; | ||
#[cfg(feature = "tonemapping_luts")] | ||
const TONEMAP_METHOD_TONY_MC_MAPFACE = 6 << Self::TONEMAP_METHOD_SHIFT_BITS; | ||
#[cfg(feature = "tonemapping_luts")] | ||
const TONEMAP_METHOD_BLENDER_FILMIC = 7 << Self::TONEMAP_METHOD_SHIFT_BITS; |
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.
Should this MeshPipelineKey
s be gated?
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.
i am moving forwards with the asumption that yes
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.
I'm not really sure of all the implications. Who/what all might depend on them existing. I would guess if they have the feature disabled they're being conscious about things like this missing. Not sure how it would affect plugins that expect them to be there or something. Might be better to resolve at runtime.
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.
It would at least be nice to use #[doc(cfg)]
to make the fact that these are gated behind a feature apparent on docs.rs
There are still some examples that use |
@@ -111,13 +109,18 @@ pub struct TonemappingPipeline { | |||
} | |||
|
|||
/// Optionally enables a tonemapping shader that attempts to map linear input stimulus into a perceptually uniform image for a given [`Camera`] entity. | |||
/// | |||
/// The default when `tonemapping_luts` is enabled is `TonyMcMapface`, otherwise it is `None`. |
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.
Why not use ReinhardLuminance when the LUT feature is disabled? At least you then get some sort of tonemapping.
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.
Tonemapping can be very distressing for pixel artists: will this affect 2D workflows?
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.
It might be better that it's off so it's obvious that it's off.
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.
After thinking about this more I wonder if it's better for it to remain pink as it is in bevy main so it's blatantly obvious (along with the existing error message) that tonemapping is missing, requiring the user to resolve it.
I'm wonder if using a feature to disable these in this way is a good fit. They are more of an asset and that kind of thing should generally be dealt with at run time. When there's an editor I would assume the situation around this kind of thing will have more clarity. I see the existing feature says:
Would it work to only disable tonemapping on the camera if this feature is not set and not change anything else? Or maybe we shouldn't manipulate their component and just take a path further down the line that has no tonemapping. The comment for the feature being what it is implies there was a desire for this situation to be unavoidably obvious to the user and require them to explicitly resolve it (by changing the |
|
Objective
Fixes #20690
Solution
Have a different default for
Tonemapping
whentonemapping_luts
is on and when it is off, and lockTonyMcMapface
,BlenderFilmic
andAgX
behind featureTesting
cargo run -p ci