Fix outlines causing UI to disappear when MSAA is enabled.

This commit is contained in:
Robin KAY 2022-08-10 01:34:50 +01:00
parent 4996c9d108
commit cb9966da79
1 changed files with 11 additions and 6 deletions

View File

@ -214,12 +214,6 @@ impl Plugin for OutlinePlugin {
.get_sub_graph_mut(bevy::core_pipeline::core_3d::graph::NAME)
.unwrap();
draw_3d_graph.add_node(OutlineNode::NAME, node);
draw_3d_graph
.add_node_edge(
bevy::core_pipeline::core_3d::graph::node::MAIN_PASS,
OutlineNode::NAME,
)
.unwrap();
draw_3d_graph
.add_slot_edge(
draw_3d_graph.input_node().unwrap().id,
@ -228,5 +222,16 @@ impl Plugin for OutlinePlugin {
OutlineNode::IN_VIEW,
)
.unwrap();
// Run after main 3D pass, but before UI psss
draw_3d_graph
.add_node_edge(
bevy::core_pipeline::core_3d::graph::node::MAIN_PASS,
OutlineNode::NAME,
)
.unwrap();
draw_3d_graph
.add_node_edge(OutlineNode::NAME, bevy::ui::draw_ui_graph::node::UI_PASS)
.unwrap();
}
}