bevy/crates
Jan Hohenheim 8531033b31
Add support for KHR_texture_transform (#11904)
Adopted #8266, so copy-pasting the description from there:

# Objective

Support the KHR_texture_transform extension for the glTF loader.

- Fixes #6335
- Fixes #11869 
- Implements part of #11350
- Implements the GLTF part of #399 

## Solution

As is, this only supports a single transform. Looking at Godot's source,
they support one transform with an optional second one for detail, AO,
and emission. glTF specifies one per texture. The public domain
materials I looked at seem to share the same transform. So maybe having
just one is acceptable for now. I tried to include a warning if multiple
different transforms exist for the same material.

Note the gltf crate doesn't expose the texture transform for the normal
and occlusion textures, which it should, so I just ignored those for
now. (note by @janhohenheim: this is still the case)

Via `cargo run --release --example scene_viewer
~/src/clone/glTF-Sample-Models/2.0/TextureTransformTest/glTF/TextureTransformTest.gltf`:


![texture_transform](https://user-images.githubusercontent.com/283864/228938298-aa2ef524-555b-411d-9637-fd0dac226fb0.png)

## Changelog

Support for the
[KHR_texture_transform](https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Khronos/KHR_texture_transform)
extension added. Texture UVs that were scaled, rotated, or offset in a
GLTF are now properly handled.

---------

Co-authored-by: Al McElrath <hello@yrns.org>
Co-authored-by: Kanabenki <lucien.menassol@gmail.com>
2024-02-21 01:11:28 +00:00
..
bevy_a11y Release 0.13.0 (#11920) 2024-02-17 09:24:25 +00:00
bevy_animation Fix docs for quaternion interpolation (#12014) 2024-02-20 23:26:40 +00:00
bevy_app Use is method instead of downcast_ref::<T>().is_some() in App::is_plugin_added (#11949) 2024-02-18 22:17:17 +00:00
bevy_asset Fix example docs on embedded_asset macro (#12003) 2024-02-20 16:13:30 +00:00
bevy_audio Release 0.13.0 (#11920) 2024-02-17 09:24:25 +00:00
bevy_core Release 0.13.0 (#11920) 2024-02-17 09:24:25 +00:00
bevy_core_pipeline rename Camera3dBundle's 'dither' field to 'deband_dither' to align with Camera2dBundle (#11939) 2024-02-19 14:01:35 +00:00
bevy_derive Release 0.13.0 (#11920) 2024-02-17 09:24:25 +00:00
bevy_diagnostic Release 0.13.0 (#11920) 2024-02-17 09:24:25 +00:00
bevy_dylib Release 0.13.0 (#11920) 2024-02-17 09:24:25 +00:00
bevy_dynamic_plugin Release 0.13.0 (#11920) 2024-02-17 09:24:25 +00:00
bevy_ecs Remove APIs deprecated in 0.13 (#11974) 2024-02-19 19:04:47 +00:00
bevy_ecs_compile_fail_tests Remove APIs deprecated in 0.13 (#11974) 2024-02-19 19:04:47 +00:00
bevy_encase_derive Release 0.13.0 (#11920) 2024-02-17 09:24:25 +00:00
bevy_gilrs Release 0.13.0 (#11920) 2024-02-17 09:24:25 +00:00
bevy_gizmos Add a [lints] entry for workspace members missing it (#11900) 2024-02-19 17:09:47 +00:00
bevy_gltf Add support for KHR_texture_transform (#11904) 2024-02-21 01:11:28 +00:00
bevy_hierarchy Release 0.13.0 (#11920) 2024-02-17 09:24:25 +00:00
bevy_input also look in just_pressed touches for position (#7743) 2024-02-19 16:44:50 +00:00
bevy_internal Rework animation to be done in two phases. (#11707) 2024-02-19 14:59:54 +00:00
bevy_log Release 0.13.0 (#11920) 2024-02-17 09:24:25 +00:00
bevy_macro_utils Update to toml_edit 0.22 (#11973) 2024-02-19 08:11:29 +00:00
bevy_macros_compile_fail_tests Standardize toml format with taplo (#10594) 2023-11-21 01:04:14 +00:00
bevy_math Add single-f32 constructors for a few (very few) primitives (#11934) 2024-02-18 07:43:45 +00:00
bevy_mikktspace Release 0.13.0 (#11920) 2024-02-17 09:24:25 +00:00
bevy_pbr Add support for KHR_texture_transform (#11904) 2024-02-21 01:11:28 +00:00
bevy_ptr Release 0.13.0 (#11920) 2024-02-17 09:24:25 +00:00
bevy_reflect Add method for querying whether a given short type path is ambiguous (#11840) 2024-02-19 16:47:11 +00:00
bevy_reflect_compile_fail_tests bevy_reflect_derive: Clean up attribute logic (#11777) 2024-02-12 15:16:27 +00:00
bevy_render Add support for KHR_texture_transform (#11904) 2024-02-21 01:11:28 +00:00
bevy_scene Release 0.13.0 (#11920) 2024-02-17 09:24:25 +00:00
bevy_sprite Add support for KHR_texture_transform (#11904) 2024-02-21 01:11:28 +00:00
bevy_tasks Release 0.13.0 (#11920) 2024-02-17 09:24:25 +00:00
bevy_text Release 0.13.0 (#11920) 2024-02-17 09:24:25 +00:00
bevy_time Release 0.13.0 (#11920) 2024-02-17 09:24:25 +00:00
bevy_transform Release 0.13.0 (#11920) 2024-02-17 09:24:25 +00:00
bevy_ui Release 0.13.0 (#11920) 2024-02-17 09:24:25 +00:00
bevy_utils refactor: Extract parallel queue abstraction (#7348) 2024-02-19 16:31:15 +00:00
bevy_window typo (#11955) 2024-02-18 20:16:15 +00:00
bevy_winit Release 0.13.0 (#11920) 2024-02-17 09:24:25 +00:00