diff options
author | metamuffin <metamuffin@disroot.org> | 2025-01-09 14:46:04 +0100 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2025-01-09 14:46:04 +0100 |
commit | cd0026e415189530558f4241c13a160afcbbb14d (patch) | |
tree | 4358ac9a4bbfaa2deb4e93cff37a39afc7ebba51 /doc | |
parent | c80016a9ef91da2362d6874c130941efcf36ac00 (diff) | |
download | weareserver-cd0026e415189530558f4241c13a160afcbbb14d.tar weareserver-cd0026e415189530558f4241c13a160afcbbb14d.tar.bz2 weareserver-cd0026e415189530558f4241c13a160afcbbb14d.tar.zst |
document spot light
Diffstat (limited to 'doc')
-rw-r--r-- | doc/resources.md | 96 |
1 files changed, 55 insertions, 41 deletions
diff --git a/doc/resources.md b/doc/resources.md index 4931f51..ba1ce72 100644 --- a/doc/resources.md +++ b/doc/resources.md @@ -27,40 +27,42 @@ ## 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 / +Vertex attribute arrays (va_\*) are resources that contain a packed float32 +array. ombinations 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 | 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 | +| 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 | | +| g_unlit | | | +| 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). @@ -72,18 +74,24 @@ white except normals are zero. [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 +- **Unlit**: Directly transfers \*_albedo to the screen if set. No lighting + shaders are applied. ## LightPart -| Key | Value Type | -| -------- | ---------- | -| radius | Float | -| emission | Vec3 | +| Key | Value Type | +| -------- | ------------------ | +| radius | Float | +| emission | Vec3 | +| spot | Vec3, Float, Float | + +- **Emission**: Luminous intensity in candela per channel. Equivalent of `color` + multiplied with `intensity` of [KHR_lights_punctual]. +- **Radius**: Radius for soft shadow calculation. If set, the light source can + be modelled to be a light emitting sphere of that radius. Not suported by + glTF. +- **Spot**: Normalized direction vector, inner and outer cone radius like + `innerConeAngle` and `outerConeAngle` in [KHR_lights_punctual]. ## EnvironmentPart @@ -95,3 +103,9 @@ white except normals are zero. ## Texture WebP + +[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 +[KHR_lights_punctual]: https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Khronos/KHR_lights_punctual |