godot/modules/dds
Oleksandr Shyshatskyi 65c9f44a2f Fix incorrect mipmap size calculation for uncompressed DDS textures
Previously, the DDS texture loader incorrectly calculated mipmap dimensions
for uncompressed textures when the original dimensions
were non-power-of-two.

For example, given a 120×120 texture, the expected mipmap chain should be:
    mipmap=0, size=120×120
    mipmap=1, size=60×60
    mipmap=2, size=30×30
    mipmap=3, size=15×15
    mipmap=4, size=7×7
    mipmap=5, size=3×3
    mipmap=6, size=1×1

But the loader was producing:
    mipmap=0, size=120×120
    mipmap=1, size=60×60
    mipmap=2, size=30×30
    mipmap=3, size=15×15
    mipmap=4, size=8×8
    mipmap=5, size=4×4
    mipmap=6, size=2×2

This commit corrects the logic to properly compute width and height independently at each mip level.

Fixes issue #105136.
2025-04-09 18:40:20 +03:00
..
tests Add DDS image load and save functionality 2025-03-14 19:31:43 -07:00
config.py SCons: Format buildsystem files with psf/black 2020-03-30 09:05:53 +02:00
dds_enums.h Add DDS image load and save functionality 2025-03-14 19:31:43 -07:00
image_saver_dds.cpp Add DDS image load and save functionality 2025-03-14 19:31:43 -07:00
image_saver_dds.h Add DDS image load and save functionality 2025-03-14 19:31:43 -07:00
register_types.cpp Disable ResourceFormatLoader/Savers of disabled classes 2025-03-21 14:23:05 -03:00
register_types.h Style: Replace header guards with #pragma once 2025-03-07 17:33:47 -06:00
SCsub SCons: Add unobtrusive type hints in SCons files 2024-09-25 09:34:35 -05:00
texture_loader_dds.cpp Fix incorrect mipmap size calculation for uncompressed DDS textures 2025-04-09 18:40:20 +03:00
texture_loader_dds.h Add DDS image load and save functionality 2025-03-14 19:31:43 -07:00