Skip to content

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

@MarkCallow

Description

@MarkCallow

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

if (inputBitDepth < bitDepth)
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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions