Skip to content

Commit 1fd37ab

Browse files
committed
Fix issue when regenerating mipmaps of cube/array textures;
1 parent c9ffca9 commit 1fd37ab

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/modules/graphics/graphics.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -8786,12 +8786,12 @@ static void mipmapTexture(gpu_stream* stream, Texture* texture, uint32_t base, u
87868786
uint32_t srcExtent[3] = {
87878787
MAX(texture->info.width >> (level - 1), 1),
87888788
MAX(texture->info.height >> (level - 1), 1),
8789-
volumetric ? MAX(texture->info.layers >> (level - 1), 1) : 1
8789+
volumetric ? MAX(texture->info.layers >> (level - 1), 1) : texture->info.layers
87908790
};
87918791
uint32_t dstExtent[3] = {
87928792
MAX(texture->info.width >> level, 1),
87938793
MAX(texture->info.height >> level, 1),
8794-
volumetric ? MAX(texture->info.layers >> level, 1) : 1
8794+
volumetric ? MAX(texture->info.layers >> level, 1) : texture->info.layers
87958795
};
87968796
gpu_blit(stream, texture->root->gpu, texture->root->gpu, srcOffset, dstOffset, srcExtent, dstExtent, GPU_FILTER_LINEAR);
87978797
if (i != count - 1) {

0 commit comments

Comments
 (0)