glTF icon indicating copy to clipboard operation
glTF copied to clipboard

Add EXT_texture_astc extension

Open wasimabbas-arm opened this issue 1 year ago • 3 comments

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

wasimabbas-arm avatar Mar 18 '24 15:03 wasimabbas-arm

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?

abbaswasim avatar Sep 07 '24 15:09 abbaswasim

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?

MarkCallow avatar Nov 19 '24 11:11 MarkCallow

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).

lexaknyazev avatar Nov 19 '24 14:11 lexaknyazev

Congratulations @wasimabbas-arm.

MarkCallow avatar Jul 12 '25 12:07 MarkCallow

Congratulations @wasimabbas-arm.

Thanks @MarkCallow and thank you for your contribution as well.

abbaswasim avatar Jul 13 '25 11:07 abbaswasim