Skip to content

PVRTC decoding: incorrect morton offset for non-square textures #61

@attilaz

Description

@attilaz

Morton offset should take texture dimensions into account see reflectedMortonOffset function:

https://www.khronos.org/registry/DataFormat/specs/1.3/dataformat.1.3.html#_format_pvrtc1_4bpp

Current implementation https://github.com/bkaradzic/bimg/blob/master/src/image.cpp#L2973 causes crashes/incorrect textures for non-square textures.

I can send PR with the function in specs, but current implementation seems more optimized.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions