Fix non-visible motion vector text in shader prepass example (#9155)

# Objective

In the shader prepass example, changing to the motion vector output
hides the text, because both it and the background are rendererd black.
Seems to have been caused by this commit?
71cf35ce42

## Solution

Make the text white on all outputs.
This commit is contained in:
Dimitri Belopopsky 2023-08-10 02:01:23 +02:00 committed by Carter Anderson
parent e20b78f9ab
commit c4edbdba5f

View file

@ -242,16 +242,10 @@ fn toggle_prepass_view(
3 => "motion vectors",
_ => unreachable!(),
};
let text_color = if *prepass_view == 3 {
Color::BLACK
} else {
Color::WHITE
};
let mut text = text.single_mut();
text.sections[0].value = format!("Prepass Output: {label}\n");
for section in &mut text.sections {
section.style.color = text_color;
section.style.color = Color::WHITE;
}
let handle = material_handle.single();