Skip to content

Improved HDR support#1124

Merged
MarkCallow merged 156 commits intoKhronosGroup:mainfrom
phasmatic3d:development
Feb 20, 2026
Merged

Improved HDR support#1124
MarkCallow merged 156 commits intoKhronosGroup:mainfrom
phasmatic3d:development

Conversation

@ViNeek
Copy link
Copy Markdown
Contributor

@ViNeek ViNeek commented Feb 18, 2026

Addressing issues #1122, #1119 and #1120

Copy link
Copy Markdown
Collaborator

@MarkCallow MarkCallow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the quick work on these issues. I have just the one comment.

I will review the test updates next.

options.swizzle->c_str());
}

// Add KTXmapRange metadata
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There needs to be a CLI option to set the range both here and in ktx encode. In here it must be possible to set it for any supported formats, not just UASTC_HDR formats. I think it is not necessary to set it unless the option has been specified.

The spec says

"This metadata entry may be used with:
any floating point format. In the case of a combined depth-stencil format, e.g. D32_SFLOAT_S8_UINT it must be applied only to the depth component.

any linear *_UNORM or *_SNORM format.

It is incompatible with and must not be used with:
non-linear formats such as those with sRGB encoding,

true integer or boolean formats.

If KTXmapRange appears in a KTX file containing these formats, the file is invalid."

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It occurs to me that an explicit option will be hard to use. You have to find the minimum and maximum values in the input file to get the correct values. We should automate this. I have to think about an easy way to achieve this. If the minimum and maximum values are separated by 16 float bits or less then it can be fully automatic. If the input range is greater than representable by 16 bits then some input from the user is needed.

Suggestions welcome.

@MarkCallow
Copy link
Copy Markdown
Collaborator

Files changed says 104 cts files were updated but there is no PR in the CTS repo. Where are the changes?

@agkar
Copy link
Copy Markdown
Contributor

agkar commented Feb 19, 2026

Following our earlier discussion, to speed up the KTX test validation process, we’ve been granted Git permissions to commit the HDR CTS directly to the main branch. The latest commit on CTS repo is b59806b9c524c2b89b35f2d4ec8b8396efd6d53b

@MarkCallow
Copy link
Copy Markdown
Collaborator

The latest commit on CTS repo is b59806b9c524c2b89b35f2d4ec8b8396efd6d53b

Thank you, @agkar.

@MarkCallow
Copy link
Copy Markdown
Collaborator

The latest commit on CTS repo is b59806b9c524c2b89b35f2d4ec8b8396efd6d53b

Thank you, @agkar.

In future please create a branch and a PR from that branch. Only merge to main when the corresponding KTX-Software PR is ready for merge. Putting modified tests in main before the corresponding KTX-Software code is ready impedes other separately developed changes from being merged.

@MarkCallow
Copy link
Copy Markdown
Collaborator

Thank you for fixing the crash.

I am going to merge this, despite the unresolved issue of a map-range option, in order to unblock other work. Please make another PR for any map-range related changes.

@MarkCallow MarkCallow merged commit 35d9f8d into KhronosGroup:main Feb 20, 2026
41 checks passed
richgel999 pushed a commit to BinomialLLC/KTX-Software-Binomial-Fork that referenced this pull request Mar 9, 2026
Fixes KhronosGroup#1122, KhronosGroup#1119, KhronosGroup#1120 and KhronosGroup#1125.

---------

Co-authored-by: agkar <a.gkaravelis@gmail.com>
Co-authored-by: Anastasios Gkaravelis <47293854+agkar@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants