Skip to content

Commit

Permalink
Apply fix mentioned in gfx-rs/wgpu#3124
Browse files Browse the repository at this point in the history
  • Loading branch information
Imberflur committed Apr 3, 2023
1 parent 49c7b0b commit 336696c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/render/texture_array_cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,11 @@ impl TextureArrayCache {
self.meta_data.get(texture).unwrap();

// Fixes weird cubemap bug.
let count = if *count == 6 { count + 1 } else { *count };
let count = if *count % 6 == 0 || *count == 1 {
count + 1
} else {
*count
};

let gpu_texture = render_device.create_texture(&TextureDescriptor {
label: Some("texture_array"),
Expand Down

0 comments on commit 336696c

Please sign in to comment.