summaryrefslogtreecommitdiff
path: root/doc/resources.md
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2025-01-09 03:01:52 +0100
committermetamuffin <metamuffin@disroot.org>2025-01-09 03:01:52 +0100
commitc80016a9ef91da2362d6874c130941efcf36ac00 (patch)
tree715481f2b15fbcbaa13fd09d56064a4265faa9dd /doc/resources.md
parent524f5d27020ca63d21cd5eca1120a1c71443e240 (diff)
downloadweareserver-c80016a9ef91da2362d6874c130941efcf36ac00.tar
weareserver-c80016a9ef91da2362d6874c130941efcf36ac00.tar.bz2
weareserver-c80016a9ef91da2362d6874c130941efcf36ac00.tar.zst
add more gltf extensions
Diffstat (limited to 'doc/resources.md')
-rw-r--r--doc/resources.md76
1 files changed, 50 insertions, 26 deletions
diff --git a/doc/resources.md b/doc/resources.md
index a6b885b..4931f51 100644
--- a/doc/resources.md
+++ b/doc/resources.md
@@ -27,38 +27,62 @@
## MeshPart
-Combinations of g__, va__ and tex_* are multiplied except normal which is added.
-Defaults should be the identity for that operation, so default is 1 / white
-except normals are zero.
+Combinations of g_\*, va_\* and tex_\* are multiplied except normal which is
+added. Defaults should be the identity for that operation, so default is 1 /
+white except normals are zero.
-| Key | Value Type | |
-| ---------------- | ------------- | ------------------ |
-| index | Resource | |
-| g_metallic | f32 | |
-| g_roughness | f32 | |
-| g_albedo | Vec3 | |
-| g_transmission | f32 | |
-| g_emission | Vec3 | |
-| va_position | [Resource; 3] | |
-| va_normal | [Resource; 3] | |
-| va_texcoord | [Resource; 2] | |
-| va_roughness | Resource | |
-| va_metallic | Resource | |
-| va_albedo | [Resource; 3] | |
-| va_transmission | Resource | |
-| va_emission | Resource | |
-| tex_normal | Resource | Use color channels |
-| tex_roughness | Resource | Use green channel |
-| tex_metallic | Resource | Use blue channel |
-| tex_albedo | Resource | Use color channels |
-| tex_transmission | Resource | Use alpha channel |
-| tex_emission | Resource | Use color channels |
+| Key | Value Type | | |
+| ------------------ | ------------- | - | ------------------ |
+| index | Resource | | |
+| g_metallic | Float | | |
+| g_roughness | Float | | |
+| g_albedo | Vec3 | | |
+| g_alpha | Float | | |
+| g_transmission | Float | | |
+| g_emission | Vec3 | | |
+| g_refractive_index | Float | | |
+| g_attenuation | Vec3 | | |
+| g_dispersion | Float | | |
+| g_thickness | Float | | |
+| va_position | [Resource; 3] | | |
+| va_normal | [Resource; 3] | | |
+| va_texcoord | [Resource; 2] | | |
+| va_roughness | Resource | | |
+| va_metallic | Resource | | |
+| va_albedo | [Resource; 3] | | |
+| va_alpha | Resource | | |
+| va_transmission | Resource | | |
+| va_emission | Resource | | |
+| tex_normal | Resource | | Use color channels |
+| tex_roughness | Resource | | Use green channel |
+| tex_metallic | Resource | | Use blue channel |
+| tex_albedo | Resource | | Use color channels |
+| tex_alpha | Resource | | Use alpha channel |
+| tex_transmission | Resource | | Use red channel |
+| tex_emission | Resource | | Use color channels |
+| tex_thickness | Resource | | Use green channels |
+
+- **Attenuation**: Attenuation coefficient for each color channel due to
+ scattering within the material volume expressed as e-folding distance (m^-1).
+ See [KHR_materials_volume].
+- **Transmission**: Equivalent to `transmissionFactor` and `transmissionTexture`
+ of [KHR_materials_transmission].
+- **Refractive Index**: Equivalent to `ior` of [KHR_materials_ior]
+- **Thickness**: Equivalent to `thicknessFactor` and `thicknessTexture` of
+ [KHR_materials_volume].
+- **Dispersion**: 20 / Abbe Number. Equivalent to `dispersion` of
+ [KHR_materials_dispersion].
+
+[KHR_materials_transmission]: https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Khronos/KHR_materials_transmission
+[KHR_materials_ior]: https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Khronos/KHR_materials_ior
+[KHR_materials_volume]: https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Khronos/KHR_materials_volume
+[KHR_materials_dispersion]: https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Khronos/KHR_materials_dispersion
## LightPart
| Key | Value Type |
| -------- | ---------- |
-| radius | f32 |
+| radius | Float |
| emission | Vec3 |
## EnvironmentPart