EmitIdentityInput
On this page

EmitIdentityInput

Interface in Tooling

The emit options that change the emitted text, other than plugins.

import type { EmitIdentityInput } from 'typeshade'

The signature, the description and the examples come from the compiler's own source at commit 26de7be8.

Syntax

interface EmitIdentityInput extends EmitOptions {
readonly emulateCompute?: boolean;
readonly overrideValues?: Readonly<Record<string, number | boolean>>;
}

Description

The list is explicit: every option here is one axis of the identity that emitIdentity computes, and an option that changes the emitted text belongs here so that the stamp describes it.

Instance properties

emulateComputeoptionalread only boolean

GLSL only. emitGlslModule({ emulateCompute }) rewrites a compute entry into a fragment shader, so it is an emit mode.

In the identity, the marker records that this compute-to-fragment rewrite ran, whether because this option was passed or because the module declares a portable compute entry, which takes the same path with no option. Pass the module as emitIdentity’s third argument and the marker is derived from either source.

overrideValuesoptionalread only Readonly<Record<string, number | boolean>>

GLSL only. Pinned override values become #defines, which changes the emitted text.

See also

Source

src/core/emit-identity.ts, line 41, at commit 26de7be8

Edit this page Report a problem