Skip to content

Notes for ETC2/EAC sample #60

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

Closed
shrekshao opened this issue Jan 19, 2016 · 5 comments
Closed

Notes for ETC2/EAC sample #60

shrekshao opened this issue Jan 19, 2016 · 5 comments
Labels

Comments

@shrekshao
Copy link
Member

  • etc2/eac compressed image can be in different file extension (ktx, pkm), each has a different "header data". For example, ktx file format has a header data of 68 bytes details.
  • To properly handle this, we may need a so-called "texture utils". Extract the data correctly from images in different format, which can be another project.
  • In this sample, I hard-coded an offset of 68 to drag the image data from the arraybuffer. Improvement can be made later.
@pjcozzi
Copy link
Contributor

pjcozzi commented Jan 24, 2017

There is now code in Cesium to parse KTXs: CesiumGS/cesium#4758

@shrekshao
Copy link
Member Author

Hmm, that is for ECT1. But I will certainly try to look into this one. It once worked on Chrome. Probably because it was some sketchy implementation at that time.

@kainino0x
Copy link

ETC2/EAC were moved into an extension shortly before the release of WebGL 2, as it has terrible performance characteristics on platforms where it's not actually supported by the hardware.

KhronosGroup/WebGL#2030

@shrekshao
Copy link
Member Author

shrekshao commented Feb 3, 2017

@kainino0x Thanks Kai for the clarifications. I will remove this sample from the list and leave a link to https://www.khronos.org/registry/webgl/extensions/WEBGL_compressed_texture_etc/ in the future

@kainino0x
Copy link

Sorry, that link is outdated because the extension got renamed. Here's the correct link:

https://www.khronos.org/registry/webgl/extensions/WEBGL_compressed_texture_etc/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants