Open attilaz opened 3 years ago
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.
Can you attach PVRTC texture that would crash?
I had a crash on windows with texturev.
fractal.zip
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.