BinomialLLC / basis_universal

Basis Universal GPU Texture Codec
Apache License 2.0
2.72k stars 267 forks source link

Update glTF 2.0 demo for 'KHR_texture_basisu' #274

Open donmccurdy opened 2 years ago

donmccurdy commented 2 years ago

The glTF WebGL demo currently has an old reference to "a hypothetical GOOGLE_texture_basis extension", written prior to the availability of the official KHR_texture_basisu extension for glTF. This PR updates the demo, model, and documentation to use the official workflow.

I converted the existing .basis image by:

  1. basisu image.basis
  2. Manually replace the .basis reference with .png reference in .gltf file
  3. Compress with gltf-transform etc1s input.gltf output.gltf

I've also removed broken links to demos – if there's a GitHub pages demo published somewhere we could link to that instead?

richgel999 commented 2 years ago

Hmm - appveyor failed. Looks like we're seeing a failure on the formatting rules for this PR - any ideas?

The following differences were found between the code and the formatting rules: diff --git a/webgl/gltf/assets/AgiHqSmall.gltf b/webgl/gltf/assets/AgiHqSmall.gltf index 5bf4f8c..a2ffa38 100755 --- a/webgl/gltf/assets/AgiHqSmall.gltf +++ b/webgl/gltf/assets/AgiHqSmall.gltf @@ -198,4 +198,4 @@ "extensionsRequired": [ "KHR_texture_basisu" ] -} \ No newline at end of file +} Aborting, please fix your commit(s) with 'git commit --amend' or 'git rebase -i '

donmccurdy commented 2 years ago

Fixed — I added the missing newline at the end of the file.