mirror of
https://github.com/bevyengine/bevy
synced 2024-11-10 07:04:33 +00:00
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
9da18cce2a
commit
c0cebfef45
1 changed files with 1 additions and 1 deletions
|
@ -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 a new issue