-
-
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
Rename rendering components for improved consistency and clarity #15035
Conversation
Agreed! |
Imo we should do the fog -> distance fog in this PR. I'd also like if you could rename variables and bundle fields to remove "settings". |
Done!
This feels like it's a bit out of scope for this PR, but I renamed a bunch of variables to remove I don't think we want to do this for bundles though. The impression I got is that we don't want to cause any unnecessary breaking changes for them (like remove or rename properties), considering the plan is to deprecate (most of) the first-party bundles in favor of required components in 0.15. |
Hmm or I guess for fog I should also rename |
Agreed on leaving the bundles alone. I'm fine to leave the fog stuff alone at this point: I like the initial rename to avoid a double-rename, making it harder to compile the migration guide. |
I have no knowledge on rendering or what any of this stuff does haha but what about expanding If I know I need "anti-aliasing", I imagine it would be really helpful to just type that in on the docs to find all my options. You could probably achieve that with a doc alias though but I don't think that helps when doing the same sort of thing in my IDE and letting intellisense be my quasi-doc-search. Although, I imagine You could maybe do it for the "main component" but I guess that could be seen as adding more inconsistencies. In either case (not necessarily part of this PR), the docs for these acronyms should at least start out with what they stand for. |
I actually added basic docs for these in this PR already, along with adding the long names as doc aliases (even though it's technically not related to this PR). See |
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.
Much nicer!
Objective
The names of numerous rendering components in Bevy are inconsistent and a bit confusing. Relevant names include:
AutoExposureSettings
AutoExposureSettingsUniform
BloomSettings
BloomUniform
(noSettings
)BloomPrefilterSettings
ChromaticAberration
(noSettings
)ContrastAdaptiveSharpeningSettings
DepthOfFieldSettings
DepthOfFieldUniform
(noSettings
)FogSettings
SmaaSettings
,Fxaa
,TemporalAntiAliasSettings
(really inconsistent??)ScreenSpaceAmbientOcclusionSettings
ScreenSpaceReflectionsSettings
VolumetricFogSettings
Firstly, there's a lot of inconsistency between
Foo
/FooSettings
andFooUniform
/FooSettingsUniform
and whether names are abbreviated or not.Secondly, the
Settings
post-fix seems unnecessary and a bit confusing semantically, since it makes it seem like the component is mostly just auxiliary configuration instead of the core thing that actually enables the feature. This will be an even bigger problem once bundles likeTemporalAntiAliasBundle
are deprecated in favor of required components, as users will expect a component namedTemporalAntiAlias
(or similar), notTemporalAntiAliasSettings
.Solution
Drop the
Settings
post-fix from the component names, and change some names to be more consistent.AutoExposure
AutoExposureUniform
Bloom
BloomUniform
BloomPrefilter
ChromaticAberration
ContrastAdaptiveSharpening
DepthOfField
DepthOfFieldUniform
DistanceFog
Smaa
,Fxaa
,TemporalAntiAliasing
(note: we might want to change toTaa
, see "Discussion")ScreenSpaceAmbientOcclusion
ScreenSpaceReflections
VolumetricFog
I kept the old names as deprecated type aliases to make migration a bit less painful for users. We should remove them after the next release. (And let me know if I should just... not add them at all)
I also added some very basic docs for a few types where they were missing, like on
Fxaa
andDepthOfField
.Discussion
TemporalAntiAliasing
is still inconsistent withSmaa
andFxaa
. Consensus on Discord seemed to be that renaming toTaa
would probably be fine, but I think it's a bit more controversial, and it would've required renaming a lot of related types likeTemporalAntiAliasNode
,TemporalAntiAliasBundle
, andTemporalAntiAliasPlugin
, so I think it's better to leave to a follow-up.Fog
should probably have a more specific name likeDistanceFog
considering it seems to be distinct fromVolumetricFog
.This should probably be done in a follow-up though, so I just removed the(done)Settings
post-fix for now.Migration Guide
Many rendering components have been renamed for improved consistency and clarity.
AutoExposureSettings
→AutoExposure
BloomSettings
→Bloom
BloomPrefilterSettings
→BloomPrefilter
ContrastAdaptiveSharpeningSettings
→ContrastAdaptiveSharpening
DepthOfFieldSettings
→DepthOfField
FogSettings
→DistanceFog
SmaaSettings
→Smaa
TemporalAntiAliasSettings
→TemporalAntiAliasing
ScreenSpaceAmbientOcclusionSettings
→ScreenSpaceAmbientOcclusion
ScreenSpaceReflectionsSettings
→ScreenSpaceReflections
VolumetricFogSettings
→VolumetricFog