# `MaterialSpec.labs`

> 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 [`MaterialSpec`](MaterialSpec.md) · inherited by [`MaterialInput`](MaterialInput.md) · labs · since 2.0.0

```ts
labs?: {
  drawOrder?: number;
  depthPrepass?: boolean;
  envIntensity?: number;
  shading?: Shading;
};
```

Labs fields: they may change in a minor.

**Default:** undefined

## Fields

<a id="draworder"></a>
### `drawOrder`

```ts
drawOrder?: number;
```

Scene-wide draw order among transparent parts (fire before glass).

**Default:** 0

<a id="depthprepass"></a>
### `depthPrepass`

```ts
depthPrepass?: boolean;
```

Depth-only pre-pass (translucent ghosts without self-overlap).

**Default:** false

<a id="envintensity"></a>
### `envIntensity`

```ts
envIntensity?: number;
```

Strength of environment reflections on this material only (1.x's `envMapIntensity`); the
stage's `environment.intensity` still applies. Check
[`supports('spec.material.labs.envIntensity')`](Session.supports.md) before using it.

**Default:** 1

<a id="shading"></a>
### `shading`

```ts
shading?: Shading;
```

A typed MaterialX graph. The material keeps its base fields only where no graph applies: on a
runtime where [`supports('labs.shading')`](Session.supports.md) is false, for a graph with a node outside
[`ShadingNodes`](ShadingNodes.md)' set ('unsupported-spec' when it is built), and after the graph's `dispose()`.
A supported graph is drawn on every path that draws the material (display, capture, every
quality tier and recovery level) with its current uniforms; one whose shader fails on the
device records 'unsupported-spec' naming the graph before its base fields show, in the
write's `problems` when known before it settles, else through the 'problem' event.

**Default:** undefined (no graph)

## Generic-API test (spec 3.1)

| Rule | Result |
| --- | --- |
| 1. Neutral name | pass: `labs` names no product |
| 2. A precedent | pass: [glTF 2.0 doubleSided](https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html#double-sided) (row `G12`); [Unity Material.renderQueue](https://docs.unity3d.com/ScriptReference/Material-renderQueue.html) (row `G12`); [Babylon.js PBRMaterial.environmentIntensity](https://github.com/BabylonJS/Babylon.js/blob/master/packages/dev/core/src/Materials/PBR/pbrMaterial.ts) (row `G65`); [Babylon.js AbstractMesh.renderingGroupId](https://github.com/BabylonJS/Babylon.js/blob/master/packages/dev/core/src/Meshes/abstractMesh.ts) (row `K13`); [Unity Object.Instantiate](https://docs.unity3d.com/ScriptReference/Object.Instantiate.html) (row `K8`); [glTF 2.0 alpha coverage (BLEND)](https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html#alpha-coverage) (row `K8`) |
| 3. Two apps, or labs | labs: it graduates when a second app uses it; apps today: app-0c773a4ee3, app-4f16d2f6da, app-59c5b5751e, app-b362a81c85, app-b4ae2fce25, app-bcb7ef21da, app-ceb4eccc72, app-ddfb017681, app-fc07850558, app-fc306ec3dc |
| 4. The cheaper fix first | decided per need in Appendix B: rows `G12`, `G65`, `K13`, `K8` at tier labs, stable (a member only where no rule, data, asset or app code serves the need) |
