filament
filament copied to clipboard
GLTFIO Webp Texture Support
Webp Texture Support
- Addresses Issue 7962 (Webp Texture Support)
- This PR broken out as 3 of 3 from #9363 per request by @pixelflinger
- Preceding PRs: #9369 #9371
Changes
- cmake option FILAMENT_SUPPORTS_WEBP_TEXTURES now actually does all of the thing. defaults to OFF
- libs/gltfio
- added WebpProvider and createOptionalWebpProvider
- adapted from StbProvider with minimal changes (substituted webp equivalents for stbi info and decoding operations)
- createOptionalWebpProvider() is always available regardless of FILAMENT_SUPPORTS_WEBP_TEXTURES
- returns new texture provider when ON
- returns nullptr when OFF
- added handling for cgltf webp_image in places where image and basisu_image were being referenced
- added test case for loading webp version of damaged helmet (see below)
- added WebpProvider and createOptionalWebpProvider
- propagated use of createOptionalWebpProvider and registration as image/webp handler to samples
- updated jvm and javascript bindings to include optional webp texture provider
- added third_party/models/DamagedHelmet/DamagedHelmetWebp.glb
- images converted to webp, textures updated to use EXT_texture_webp extension
- geometry draco compressed
- modifications done via gltf-transform CLI utility
- used in updated gltfio_test
Can you also add to
third_party/models/DamagedHelmet/README.mdto indicate how the Webp version came about?
Fixed.
@benn-herrera we're almost there! Looks like the iOS build is failing and the PR needs a rebase.
@benn-herrera we're almost there! Looks like the iOS build is failing and the PR needs a rebase.
on it.
EDIT: should be fixed with last commit. iOS builds for me locally.
Fixed a couple issues that only showed up when WebP is enabled.