glTF-Sample-Viewer icon indicating copy to clipboard operation
glTF-Sample-Viewer copied to clipboard

Webp asset spawns errors, occlusion is incorrect

Open echadwick-artist opened this issue 2 years ago • 2 comments

  1. https://github.khronos.org/glTF-Sample-Viewer-Release/
  2. Model = GlassBrokenWindow

Result: no errors. This is as expected.

  1. Unzip the attached asset, and drag-and-drop the GLB into the viewer.

Result: Two problems: a) Error message "Image is undefined for texture undefined", which appears on load, and every time model is moved. b) Occlusion debug view shows incorrect texture.

2023-10-09 11_32_48-glTF Sample Viewer

glTF Validator reports no problems for the GLB with webp textures.

GlassBrokenWindow_webp.zip

Thanks for looking into this! Eric

echadwick-artist avatar Oct 09 '23 15:10 echadwick-artist

The sample viewer does not support decoding WebP images. While the spec only allows image/jpeg and image/png as image mime types, the schema does not enforce any specific mime type, which is maybe why the validator does not complain.

jim-ec avatar Nov 21 '23 14:11 jim-ec

Ah, thanks.

It seems to me the sample viewer should support all ratified extensions.

This asset uses the last one on the list, EXT_texture_webp

echadwick-artist avatar Nov 21 '23 16:11 echadwick-artist

The error message is better now, but WebP was ratified some time ago. It should be supported here.

screenshot

emackey avatar May 20 '24 14:05 emackey