Repository navigation
Conversation
|
FYI This is my first PR, just in case you need to poke the CI server. Also I'm not a huge fan of external nodes referencing |
|
Would it be possible to add an empty node that's called FINAL_PASS that runs after the TRANSPARENT_PASS? That way other nodes that depend on the main pass won't need to know the transparent pass is the last one. |
Potentially, and that could be where the hack I mentioned earlier lives, however I'm not yet sure if empty nodes adds unnecessary overhead. Another potential would be to add the |
Couldn't you make the 3 nodes into a subgraph? I think this would even make these changes non-breaking. |
Nice idea. Yes, I'll reconfigure and update this PR today. |
|
I ran the transparency_3d_pr_6097.mp4On main ( transparency_3d_main.mp4As you can see the behaviour is different. |
Sure thing. |
Current issues: - I'm not yet sure where to define the node names - I'm not yet sure whether to implement the inner opaque, apha_mask, and transparent nodes as a separate plugin, or whether to do all the setup in Core3dPlugin - There is an assertion failure in the current code in this commit because the render graph is not set up correctly. I'm sure this should be an easy fix
f376dc5 to
c2d7902
Compare
|
Hi folks, I need to admit that I'm struggling with some ongoing personal issues right now and I can't commit to finishing this right now. If anyone wants to take over, be my guest. I did start the rebase and implementing the render graph as a sub-graph of the main render pass, but I'm afraid I haven't been able to finish it right now. You can find my current progress at: https://github.com/alexmadeathing/bevy/tree/separate-render-phases Here's a copy of the latest commit message, which includes info about the issues I was running into: In addition, since I was working on this, main has moved on a bit. So this branch will need to be rebased again. Good luck! If I'm better soon, I will of course come back to this. I'll check in here when that time comes up. |
|
I think all the changes from this PR have already been done in #8090. Should this be closed? |
|
Opaque and alpha are still combined, but transparent was split. Given the age of this PR, I'm closing it. If there's a demand for splitting alpha and opaque up, please open a new PR/issue. |
Objective
The objective of this PR is to give the user the ability to insert their own logic between render passes, and to further modularize Bevy's code.
There's currently no mechanism for inserting custom render logic between render passes in the core pipeline. E.g. between drawing alpha masked entities and transparent entities. All three passes, opaque, alpha mask, and transparent, execute back-to-back inside
MainPass3dNode.Solution
MainPass3dNodeinto three separate nodes:OpaquePass3dNode,AlphaMaskPass3dNode, andTransparentPass3dNodecore_3d::graph::node::MAIN_PASStocore_3d::graph::node::TRANSPARENT_PASSMainPass3dNodeandMainPass2dNode(search "WebGL2 quirk"); this could be made into something likeDummyPassNodeand only included in the graph when featurewebglis active - for now, I've moved it toTransparentPass3dNodeChangelog
Changed
MainPass3dNodehas been divided into three separate nodes:OpaquePass3dNode,AlphaMaskPass3dNode, andTransparentPass3dNodeMigration Guide
core_3d::graph::node::MAIN_PASShas been removed and replaced withcore_3d::graph::node::OPAQUE_PASS,core_3d::graph::node::ALPHA_MASK_PASS, andcore_3d::graph::node::TRANSPARENT_PASS, which represent nodes for each individual pass in the core 3d pipeline