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`:  ## 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>
60 lines
1.8 KiB
TOML
60 lines
1.8 KiB
TOML
[package]
|
|
name = "bevy_gltf"
|
|
version = "0.13.0"
|
|
edition = "2021"
|
|
description = "Bevy Engine GLTF loading"
|
|
homepage = "https://bevyengine.org"
|
|
repository = "https://github.com/bevyengine/bevy"
|
|
license = "MIT OR Apache-2.0"
|
|
keywords = ["bevy"]
|
|
|
|
[features]
|
|
dds = []
|
|
pbr_transmission_textures = []
|
|
|
|
[dependencies]
|
|
# bevy
|
|
bevy_animation = { path = "../bevy_animation", version = "0.13.0", optional = true }
|
|
bevy_app = { path = "../bevy_app", version = "0.13.0" }
|
|
bevy_asset = { path = "../bevy_asset", version = "0.13.0" }
|
|
bevy_core = { path = "../bevy_core", version = "0.13.0" }
|
|
bevy_core_pipeline = { path = "../bevy_core_pipeline", version = "0.13.0" }
|
|
bevy_ecs = { path = "../bevy_ecs", version = "0.13.0" }
|
|
bevy_hierarchy = { path = "../bevy_hierarchy", version = "0.13.0" }
|
|
bevy_log = { path = "../bevy_log", version = "0.13.0" }
|
|
bevy_math = { path = "../bevy_math", version = "0.13.0" }
|
|
bevy_pbr = { path = "../bevy_pbr", version = "0.13.0" }
|
|
bevy_reflect = { path = "../bevy_reflect", version = "0.13.0", features = [
|
|
"bevy",
|
|
] }
|
|
bevy_render = { path = "../bevy_render", version = "0.13.0" }
|
|
bevy_scene = { path = "../bevy_scene", version = "0.13.0", features = [
|
|
"bevy_render",
|
|
] }
|
|
bevy_transform = { path = "../bevy_transform", version = "0.13.0" }
|
|
bevy_tasks = { path = "../bevy_tasks", version = "0.13.0" }
|
|
bevy_utils = { path = "../bevy_utils", version = "0.13.0" }
|
|
|
|
# other
|
|
gltf = { version = "1.4.0", default-features = false, features = [
|
|
"KHR_lights_punctual",
|
|
"KHR_materials_transmission",
|
|
"KHR_materials_ior",
|
|
"KHR_materials_volume",
|
|
"KHR_materials_unlit",
|
|
"KHR_materials_emissive_strength",
|
|
"KHR_texture_transform",
|
|
"extras",
|
|
"extensions",
|
|
"names",
|
|
"utils",
|
|
] }
|
|
thiserror = "1.0"
|
|
base64 = "0.21.5"
|
|
percent-encoding = "2.1"
|
|
serde = { version = "1.0", features = ["derive"] }
|
|
serde_json = "1"
|
|
|
|
[lints]
|
|
workspace = true
|