Make Viewport::default()
return a 1x1 viewport (#14372)
# Objective - The current default viewport crashes bevy due to a wgpu validation error, this PR fixes that - Fixes https://github.com/bevyengine/bevy/issues/14355 ## Solution - `Viewport::default()` now returns a 1x1 viewport ## Testing - I modified the `3d_viewport_to_world` example to use `Viewport::default()`, and it works as expected (only the top-left pixel is rendered)
This commit is contained in:
parent
42412f3500
commit
420ca6c43c
@ -61,7 +61,7 @@ impl Default for Viewport {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
physical_position: Default::default(),
|
||||
physical_size: Default::default(),
|
||||
physical_size: UVec2::new(1, 1),
|
||||
depth: 0.0..1.0,
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user