overrideRef
On this page

overrideRef()

Function in Values

A read of a pipeline specialization constant, the read side of an overrideConst(...) declaration.

import { overrideRef } from 'typeshade/core/ir'

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

Syntax

function overrideRef<T extends ShaderType>(name: string, type: T): ReadonlyNode<KeyOf<T>>

Parameters

name string
type T extends ShaderType

Return value

ReadonlyNode<KeyOf<T>>

Description

The result is a ReadonlyNode, and the optimizer treats it as opaque: the value is symbolic until pipeline creation, so no folding or dead-branch pass may collapse a branch it guards. Authoring code reads through the handle overrideConst returns; this is the primitive behind that handle.

See also

Source

src/core/ir/node.ts, line 899, at commit af54ddad5

Edit this page Report a problem