-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
140 additions
and
0 deletions.
There are no files selected for viewing
121 changes: 121 additions & 0 deletions
121
extensions/2.0/Vendor/EXT_materials_dispersion/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,121 @@ | ||
# EXT\_materials\_disperson | ||
|
||
## Contributors | ||
|
||
- Ben Houston, Threekit [@bhouston](https://github.com/bhouston) | ||
|
||
Copyright 2023 The Khronos Group Inc. All Rights Reserved. glTF is a trademark of The Khronos Group Inc. | ||
See [Appendix](#appendix-full-khronos-copyright-statement) for full Khronos Copyright Statement. | ||
|
||
## Status | ||
|
||
Draft | ||
|
||
## Dependencies | ||
|
||
Written against the glTF 2.0 spec. | ||
|
||
## Exclusions | ||
|
||
- This extension must not be used on a material that also uses `KHR_materials_pbrSpecularGlossiness`. | ||
- This extension must not be used on a material that also uses `KHR_materials_unlit`. | ||
|
||
## Overview | ||
|
||
This extension adds one parameters to the metallic-roughness material: `dispersion`. | ||
|
||
`disperson` allows users to configure the strength of the dispersion effect in terms of its Abby number. The dispersion effect is a result of the wavelength-dependent index of refraction of a material. It is also known as chromatic aberration. | ||
|
||
## Extending Materials | ||
|
||
The dispersion, defined in terms of Abby number, is defined by adding the `KHR_materials_dispersion` extension to any glTF material. | ||
|
||
```json | ||
{ | ||
"materials": [ | ||
{ | ||
"extensions": { | ||
"EXT_materials_dispersion": { | ||
"dispersion": 42 | ||
} | ||
} | ||
} | ||
] | ||
} | ||
``` | ||
|
||
Factor and texture are combined by multiplication to describe a single value. | ||
|
||
| |Type|Description|Required| | ||
|-|----|-----------|--------| | ||
| **dispersion** | `number` | The strength of the dispersion effect, specified as an Abby number. | No, default: `59`| | ||
|
||
The default value of 59 is taken from the low dispersion of crown glass. | ||
|
||
## Implementation | ||
|
||
*This section is non-normative.* | ||
|
||
*TODO* | ||
|
||
## Interaction with other extensions | ||
|
||
*TODO* | ||
|
||
|
||
## Schema | ||
|
||
- [material.KHR_materials_dispersion.schema.json](schema/material.KHR_materials_dispersion.schema.json) | ||
|
||
## Appendix: Full Khronos Copyright Statement | ||
|
||
Copyright 2023 The Khronos Group Inc. | ||
|
||
Some parts of this Specification are purely informative and do not define requirements | ||
necessary for compliance and so are outside the Scope of this Specification. These | ||
parts of the Specification are marked as being non-normative, or identified as | ||
**Implementation Notes**. | ||
|
||
Where this Specification includes normative references to external documents, only the | ||
specifically identified sections and functionality of those external documents are in | ||
Scope. Requirements defined by external documents not created by Khronos may contain | ||
contributions from non-members of Khronos not covered by the Khronos Intellectual | ||
Property Rights Policy. | ||
|
||
This specification is protected by copyright laws and contains material proprietary | ||
to Khronos. Except as described by these terms, it or any components | ||
may not be reproduced, republished, distributed, transmitted, displayed, broadcast | ||
or otherwise exploited in any manner without the express prior written permission | ||
of Khronos. | ||
|
||
This specification has been created under the Khronos Intellectual Property Rights | ||
Policy, which is Attachment A of the Khronos Group Membership Agreement available at | ||
www.khronos.org/files/member_agreement.pdf. Khronos grants a conditional | ||
copyright license to use and reproduce the unmodified specification for any purpose, | ||
without fee or royalty, EXCEPT no licenses to any patent, trademark or other | ||
intellectual property rights are granted under these terms. Parties desiring to | ||
implement the specification and make use of Khronos trademarks in relation to that | ||
implementation, and receive reciprocal patent license protection under the Khronos | ||
IP Policy must become Adopters and confirm the implementation as conformant under | ||
the process defined by Khronos for this specification; | ||
see https://www.khronos.org/adopters. | ||
|
||
Khronos makes no, and expressly disclaims any, representations or warranties, | ||
express or implied, regarding this specification, including, without limitation: | ||
merchantability, fitness for a particular purpose, non-infringement of any | ||
intellectual property, correctness, accuracy, completeness, timeliness, and | ||
reliability. Under no circumstances will Khronos, or any of its Promoters, | ||
Contributors or Members, or their respective partners, officers, directors, | ||
employees, agents or representatives be liable for any damages, whether direct, | ||
indirect, special or consequential damages for lost revenues, lost profits, or | ||
otherwise, arising from or in connection with these materials. | ||
|
||
Vulkan is a registered trademark and Khronos, OpenXR, SPIR, SPIR-V, SYCL, WebGL, | ||
WebCL, OpenVX, OpenVG, EGL, COLLADA, glTF, NNEF, OpenKODE, OpenKCAM, StreamInput, | ||
OpenWF, OpenSL ES, OpenMAX, OpenMAX AL, OpenMAX IL, OpenMAX DL, OpenML and DevU are | ||
trademarks of The Khronos Group Inc. ASTC is a trademark of ARM Holdings PLC, | ||
OpenCL is a trademark of Apple Inc. and OpenGL and OpenML are registered trademarks | ||
and the OpenGL ES and OpenGL SC logos are trademarks of Silicon Graphics | ||
International used under license by Khronos. All other product names, trademarks, | ||
and/or company names are used solely for identification and belong to their | ||
respective owners. |
19 changes: 19 additions & 0 deletions
19
.../2.0/Vendor/EXT_materials_dispersion/schema/material.KHR_materials_dispersion.schema.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-04/schema", | ||
"title": "KHR_materials_dispersion glTF Material Extension", | ||
"type": "object", | ||
"description": "glTF extension that defines the strength of dispersion.", | ||
"allOf": [ { "$ref": "glTFProperty.schema.json" } ], | ||
"properties": { | ||
"dispersion": { | ||
"type": "number", | ||
"description": "The strength of the dispersion.", | ||
"default": 59.0, | ||
"minimum": 1.0, | ||
"maximum": 1000.0, | ||
"gltf_detailedDescription": "This parameter defines dispersion in terms of the Abby number formulation." | ||
}, | ||
"extensions": { }, | ||
"extras": { } | ||
} | ||
} |