# `Labs.shading`

> Contract 2.0.0 · package sha256 `a857eca95b35921109faf997094bb4192f12527d9d0fcd4be7e97f06425bad6e` · generated from `configurator-runtime.d.ts` by `services/onsite-scripter/scripts/build-contract-docs.mjs`; edit the source, not this file.

Property of [`Labs`](Labs.md) · labs · since 2.0.0 · called as `session.labs.shading`

```ts
readonly shading: {
  graph<U extends Record<string, ShadingUniformType>>(uniforms: U, build: (n: ShadingNodes<U>) => ShadingOutputs, options: {
    owner: Collection;
  }): Shading<U>;
};
```

Typed MaterialX shading graphs (a fabric grade, a wood grain).

## Members

| Member | Summary |
| --- | --- |
| [`graph`](Labs.shading.graph.md) | Builds a graph from typed nodes; `uniforms` names its inputs and their types. |

## Generic-API test (spec 3.1)

| Rule | Result |
| --- | --- |
| 1. Neutral name | pass: `shading` names no product |
| 2. A precedent | pass: [Babylon.js NodeMaterial](https://github.com/BabylonJS/Babylon.js/blob/master/packages/dev/core/src/Materials/Node/nodeMaterial.ts) (row `K21`); [Blender shader nodes](https://docs.blender.org/manual/en/latest/render/shader_nodes/index.html) (row `K21`) |
| 3. Two apps, or labs | labs: it graduates when a second app uses it; apps today: app-510d750508, app-59c5b5751e |
| 4. The cheaper fix first | decided per need in Appendix B: rows `K21` at tier labs (a member only where no rule, data, asset or app code serves the need) |
