Hello,
Since mipmapping in texture arrays doesn’t reduce the number of layers (or pages) I guess I could reuse this function:
void Texture::
filter_3d_mipmap_level(Texture::RamImage &to, const Texture::RamImage &from,
int x_size, int y_size, int z_size) {
size_t pixel_size = _num_components * _component_width;
size_t row_size = (size_t)x_size * pixel_size;
size_t page_size = (size_t)y_size * row_size;
int to_x_size = max(x_size >> 1, 1);
int to_y_size = max(y_size >> 1, 1);
int to_z_size = max(z_size >> 1, 1);
...
for (z = 0; z < z_size - 1; z += 2) {
...
}
changing only to_z_size = max(z_size >> 0, 1); and z+=1 in the for loop right?