Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add KHR_texture_astc extension #2369

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

wasimabbas-arm
Copy link

@wasimabbas-arm wasimabbas-arm commented Mar 18, 2024

Add an extension for native ASTC encoded ktx2 images. Extension only supports LDR, no HDR or 3D images supported yet.

@wasimabbas-arm wasimabbas-arm changed the title Add KHR_texture_astc extension WIP: Add KHR_texture_astc extension Mar 18, 2024
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.

Looks good but I do think you'll need to address the fragmentation of ASTC implementations into LDR-only, LDR+HDR and LDR+HDR+3D possibly by having multiple extensions. I'm no glTF expert but perhaps you can just have different extension names in this single extension document. That's what the GL extensions did IIRC.

extensions/2.0/Khronos/KHR_texture_astc/README.md Outdated Show resolved Hide resolved
extensions/2.0/Khronos/KHR_texture_astc/README.md Outdated Show resolved Hide resolved
extensions/2.0/Khronos/KHR_texture_astc/README.md Outdated Show resolved Hide resolved
extensions/2.0/Khronos/KHR_texture_astc/README.md Outdated Show resolved Hide resolved
extensions/2.0/Khronos/KHR_texture_astc/README.md Outdated Show resolved Hide resolved
extensions/2.0/Khronos/KHR_texture_astc/README.md Outdated Show resolved Hide resolved
extensions/2.0/Khronos/KHR_texture_astc/README.md Outdated Show resolved Hide resolved
extensions/2.0/Khronos/KHR_texture_astc/README.md Outdated Show resolved Hide resolved
@abbaswasim
Copy link

abbaswasim commented Sep 7, 2024

Looks good but I do think you'll need to address the fragmentation of ASTC implementations into LDR-only, LDR+HDR and LDR+HDR+3D possibly by having multiple extensions. I'm no glTF expert but perhaps you can just have different extension names in this single extension document. That's what the GL extensions did IIRC.

I am not sure why we need to make the distinction? If all of these can be specified from the vkFormat then why have multiple extensions?

@wasimabbas-arm wasimabbas-arm changed the title WIP: Add KHR_texture_astc extension Add KHR_texture_astc extension Sep 7, 2024
extensions/2.0/Khronos/KHR_texture_astc/README.md Outdated Show resolved Hide resolved
extensions/2.0/Khronos/KHR_texture_astc/README.md Outdated Show resolved Hide resolved
extensions/2.0/Khronos/KHR_texture_astc/README.md Outdated Show resolved Hide resolved
extensions/2.0/Khronos/KHR_texture_astc/README.md Outdated Show resolved Hide resolved
extensions/2.0/Khronos/KHR_texture_astc/README.md Outdated Show resolved Hide resolved
extensions/2.0/Khronos/KHR_texture_astc/README.md Outdated Show resolved Hide resolved
extensions/2.0/Khronos/KHR_texture_astc/README.md Outdated Show resolved Hide resolved
@MarkCallow
Copy link
Collaborator

I am not sure why we need to make the distinction? If all of these can be specified from the vkFormat then why have multiple extensions?

Because a glTF implementation says it supports the functionality by using it. If not supported it falls back to the alternative given in the glTF file. So if the implementation starts using the extension because it "supports ASTC" then finds it is an HDR image and the graphics API below it does not support HDR that's a problem. It may be too late to fall back.

@lexaknyazev any comment on this?

@lexaknyazev
Copy link
Member

Because a glTF implementation says it supports the functionality by using it. If not supported it falls back to the alternative given in the glTF file. So if the implementation starts using the extension because it "supports ASTC" then finds it is an HDR image and the graphics API below it does not support HDR that's a problem. It may be too late to fall back.

If the goal of this extension is to provide a drop-in replacement for JPEG/PNG images in the existing glTF ecosystem, then only LDR payloads should be supported.

Besides, non-LDR textures cannot be used with the existing material properties in principle (see another comment above).

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.

5 participants