KhronosGroup / glTF-Compressor

To store the source code for the glTF-Compressor project
Other
58 stars 6 forks source link

Incorrect thumbnail gamma with KTX #4

Closed echadwick-artist closed 1 year ago

echadwick-artist commented 1 year ago
  1. Download a GLB which contains KTX2 assets inside it, for example https://github.com/KhronosGroup/3D-Formats-Guidelines/blob/main/samples/StainedGlassLamp/StainedGlassLamp-KTX-BasisU-Volume-ETC1S.glb
  2. Go to https://phasmatic3d.github.io/glTF-Sample-Viewer-KTX-demo/
  3. Drag and drop the GLB into the 3d view.
  4. Go to the Texture Compressor tab.
  5. Open a new Chrome window, and repeat the above except using a GLB with PNG/JPG textures, for example https://github.com/KhronosGroup/3D-Formats-Guidelines/blob/main/samples/StainedGlassLamp/StainedGlassLamp-JPG-PNG-Volume.glb
  6. Compare the two windows side-by-side.

Result: some thumbnails are displayed with incorrect gamma.

Screenshots comparing glTF with KTX vs glTF with PNG/JPG: 2023-06-29 17_06_08-glTF Sample Viewer 2023-06-29 17_11_39-AnisotropyBarnLamp gltf - Visual Studio Code

abasilak commented 1 year ago

The commits https://github.com/phasmatic3d/glTF-Sample-Viewer-KTX/commit/994ec01d476c07523fdb81bced997af750a171b7 & https://github.com/phasmatic3d/glTF-Sample-Viewer-KTX/commit/0212e0c28409c72570f13c72413852ef2953012f solved this issue.

echadwick-artist commented 1 year ago

Looks great, thank you so much!