Skip to content

Improved HDR support#1124

Open
ViNeek wants to merge 156 commits intoKhronosGroup:mainfrom
phasmatic3d:development
Open

Improved HDR support#1124
ViNeek wants to merge 156 commits intoKhronosGroup:mainfrom
phasmatic3d:development

Conversation

@ViNeek
Copy link
Contributor

@ViNeek ViNeek commented Feb 18, 2026

Addressing issues #1122, #1119 and #1120

Copy link
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
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
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
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
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
Collaborator

The latest commit on CTS repo is b59806b9c524c2b89b35f2d4ec8b8396efd6d53b

Thank you, @agkar.

@MarkCallow
Copy link
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.

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

Comments