mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Fix trying to create a zero sized shadow texture when resizing window down to a small size
This commit is contained in:
parent
109d87bf81
commit
cbf0a6baf1
@ -188,7 +188,9 @@ impl ShadowMap {
|
||||
let diag_two_size = u32::checked_next_power_of_two(diag_size)
|
||||
.filter(|&e| e <= max_texture_size)
|
||||
// Limit to max texture resolution rather than error.
|
||||
.unwrap_or(max_texture_size);
|
||||
.unwrap_or(max_texture_size)
|
||||
// Make sure we don't try to create a zero sized texture (divided by 4 below)
|
||||
.max(4);
|
||||
|
||||
let point_shadow_tex = wgpu::TextureDescriptor {
|
||||
label: None,
|
||||
|
Loading…
Reference in New Issue
Block a user