ktx create not doing verbatim copy of EXR half_float. Also "Not enough precision" error message is unclear.

Abierto
#970 3 comentarios 0 reacciones 1 asignado Ver en GitHub

Los mantenedores suelen responder en 1 día

@MarkCallow ya está trabajando en esto.

Desde el 6/1/2025.

Evaluación

Este issue todavía no se ha evaluado.

Descripción

When loading an EXR file with half float channels and --format R32B32B32A32_SFLOAT ktx create raises an error

Not enough precision to convert 16 bit input to 32 bit output for R32B32B32A32_SFLOAT.

However ExrInput::ReadImage happily accepts a targetBitDepth of 32 which it passes on to LoadEXRImageFromMemory which returns float values. If I comment out this code https://github.com/KhronosGroup/KTX-Software/blob/b6190046bbf71e0fbf9e7a964f6ee39d726b16be/tools/ktx/command_create.cpp#L1406 where the error is raised then ktx create successfully creates the texture. So two questions:

  1. Why is it attempting to convert to float when it already has float? It requested float and received float.
  2. "Not enough precision"? TinyEXR is managing to do the conversion. Is this poor error message wording and ktx create simply does not implement such conversions?

The half-float file I've been using for testing is https://raw.githubusercontent.com/AcademySoftwareFoundation/openexr-images/main/ScanLines/Blobbies.jpg.

Lenguaje dominante
C++
Estrellas
1.4k
Forks
328
Merge medio
20 h 40 min
PR fusionados (30 d)
18

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de KhronosGroup/KTX-Software

Todos los issues de KhronosGroup/KTX-Software

Issues similares

Más issues de C++

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.