Skip to content

Commit

Permalink
Merge branch 'ADOBE_materials_clearcoat_tint' of https://github.com/M…
Browse files Browse the repository at this point in the history
…iiBond/glTF into ADOBE_materials_clearcoat_tint
  • Loading branch information
MiiBond committed Sep 11, 2023
2 parents b690d90 + 3802e28 commit e0b318f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
18 changes: 9 additions & 9 deletions extensions/2.0/Vendor/ADOBE_materials_clearcoat_tint/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Contributors

* Mike Bond, Adobe, [@miibond](https://twitter.com/miibond)
- Mike Bond, Adobe, [@miibond](https://twitter.com/miibond)

## Status

Expand All @@ -11,12 +11,12 @@ Complete
## Dependencies

Written against the glTF 2.0 spec.
* Requires the `KHR_materials_clearcoat` extension to also be defined on the material
- Requires the `KHR_materials_clearcoat` extension to also be defined on the material

## 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`.
- 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

Expand Down Expand Up @@ -50,15 +50,15 @@ Adding tint to clearcoat materials can be done by adding the `ADOBE_materials_cl

### Clearcoat Tint

All implementations should use the same calculations for the BRDF inputs. Implementations of the BRDF itself can vary based on device performance and resource constraints. See [Appendix B](/specification/2.0/README.md#appendix-b-brdf-implementation) for more details on the BRDF calculations.
All implementations should use the same calculations for the BRDF inputs. Implementations of the BRDF itself can vary based on device performance and resource constraints. See [Appendix B](https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html#appendix-b-brdf-implementation) for more details on the BRDF calculations.

As with the core glTF 2.0 spec, all coloured textures are assumed to be sRGB and all coloured factors are assumed to be linear.

| | Type | Description | Required |
|----------------------------------|---------------------------------------------------------------------------------|----------------------------------------|----------------------|
|**clearcoatTintFactor** | `number[3]` | The clearcoat tint's colour factor. | No, default: `[1.0, 1.0, 1.0]` |
|**clearcoatTintTexture** | [`textureInfo`](/specification/2.0/README.md#reference-textureInfo) | The clearcoat layer's tint texture. | No |
|**clearcoatTintFactor** | `number[3]` | The clearcoat tint's colour factor. | No, default: `[1.0, 1.0, 1.0]` |
|**clearcoatTintTexture** | [`textureInfo`](https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html#reference-textureinfo) | The clearcoat layer's tint texture. | No |

The clearcoat tint defines the transmittance of light through the coat. That is, it defines what colour of light is allowed to pass through. As with other factor/texture combinations, these two values are multiplied.
```
clearcoat_tint.rgb = clearcoatTintFactor.rgb * clearcoatTintTexture.rgb
Expand All @@ -75,5 +75,5 @@ color = mix(vec3(1.0), clearcoat_tint, clearcoatBlendFactor) * (f_emissive + f_d

## Schema

- [glTF.ADOBE_materials_clearcoat_tint.schema.json](schema/glTF.KHR_materials_clearcoat.schema.json)
- [material.ADOBE_materials_clearcoat_tint.schema.json](schema/material.ADOBE_materials_clearcoat_tint.schema.json)

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "http://json-schema.org/draft-04/schema",
"title": "ADOBE_materials_clearcoat_tint glTF extension",
"title": "ADOBE_materials_clearcoat_tint glTF Material Extension",
"type": "object",
"description": "glTF extension that defines the colour tint of the clearcoat.",
"allOf": [ { "$ref": "glTFProperty.schema.json" } ],
Expand Down

0 comments on commit e0b318f

Please sign in to comment.