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

Split up MainPass3dNode #8089

Closed
JMS55 opened this issue Mar 14, 2023 · 2 comments · Fixed by #8090
Closed

Split up MainPass3dNode #8089

JMS55 opened this issue Mar 14, 2023 · 2 comments · Fixed by #8090
Labels
A-Rendering Drawing game state to the screen C-Feature A new feature, making something new possible D-Trivial Nice and easy! A great choice to get started with Bevy
Milestone

Comments

@JMS55
Copy link
Contributor

JMS55 commented Mar 14, 2023

What problem does this solve or what need does it fill?

Upcoming render features want to optionally insert rendering logic in between the opaque/alpha/transparent phases.

What solution would you like?

Split MainPass3dNode into two separate nodes: opaque + alpha, and transparent.

Alternatives

Add user defined callbacks that run in between the passes, to keep everything in the same node, and reuse render passes.

Additional context

@JMS55 JMS55 added C-Feature A new feature, making something new possible D-Trivial Nice and easy! A great choice to get started with Bevy A-Rendering Drawing game state to the screen labels Mar 14, 2023
@JMS55 JMS55 added this to the 0.11 milestone Mar 14, 2023
@superdump
Copy link
Contributor

Yup. Though importantly they need to reuse render passes where possible. Opaque and alpha mask should reuse the same render pass for example.

@JMS55
Copy link
Contributor Author

JMS55 commented Mar 14, 2023

We don't currently do that, but as part of splitting the nodes up we could do so.

superdump pushed a commit that referenced this issue Mar 28, 2023
# Objective

Fixes #8089. 

## Solution

Splits the MainPass3dNode into 2 nodes, one for the opaque + alpha
passes and one for the transparent pass.

---

## Changelog
- Split MainPass3dNode into MainOpaquePass3dNode and
MainTransparentPass3dNode
- Combine opaque and alpha phases in MainOpaquePass3dNode into one pass
- Create `START_MAIN_PASS` and `END_MAIN_PASS` empty nodes as labels
- Main pass becomes `START_MAIN_PASS -> MAIN_OPAQUE_PASS ->
MAIN_TRANSPARENT_PASS -> END_MAIN_PASS`

## Migration Guide

Nodes that previously added edges involving `MAIN_PASS` should now add
edges to or from `START_MAIN_PASS` or `END_MAIN_PASS` respectively.
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-Feature A new feature, making something new possible D-Trivial Nice and easy! A great choice to get started with Bevy
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants