mirror of
https://github.com/bevyengine/bevy
synced 2024-11-24 21:53:07 +00:00
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:
parent
e20b78f9ab
commit
c4edbdba5f
1 changed files with 1 additions and 7 deletions
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue