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 GitHub
parent e87d3cccbe
commit b8695d06b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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();