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

Clean up 2d render phases #12982

Merged
merged 3 commits into from
May 8, 2024
Merged

Conversation

IceSentry
Copy link
Contributor

@IceSentry IceSentry commented Apr 15, 2024

Objective

Currently, the 2d pipeline only has a transparent pass that is used for everything. I want to have separate passes for opaque/alpha mask/transparent meshes just like in 3d.

This PR does the basic work to start adding new phases to the 2d pipeline and get the current setup a bit closer to 3d.

Solution

  • Use ViewNode for MainTransparentPass2dNode
  • Added Node2d::StartMainPass, Node2d::EndMainPass
  • Rename everything to clarify that the main pass is currently the transparent pass

Changelog

  • Added Node2d::StartMainPass, Node2d::EndMainPass

Migration Guide

If you were using Node2d::MainPass to order your own custom render node. You now need to order it relative to Node2d::StartMainPass or Node2d::EndMainPass.

@IceSentry IceSentry added A-Rendering Drawing game state to the screen C-Enhancement A new feature C-Breaking-Change A breaking change to Bevy's public API that needs to be noted in a migration guide labels Apr 15, 2024
@IceSentry IceSentry force-pushed the 2d-phases-cleanup branch 3 times, most recently from ace2d1e to df23a13 Compare April 22, 2024 21:52
Copy link
Contributor

@kristoff3r kristoff3r left a comment

Choose a reason for hiding this comment

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

LGTM, simple changes and I ran a bunch of the 2D examples on Linux and everything still worked.

Copy link
Contributor

@jgayfer jgayfer left a comment

Choose a reason for hiding this comment

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

New to Bevy, but this seems relatively straight forward 👍

@IceSentry IceSentry added the S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it label May 6, 2024
@alice-i-cecile alice-i-cecile added this pull request to the merge queue May 8, 2024
Merged via the queue into bevyengine:main with commit 64e1a78 May 8, 2024
28 checks passed
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-Breaking-Change A breaking change to Bevy's public API that needs to be noted in a migration guide C-Enhancement A new feature S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants