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'

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

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 1088, at commit 26de7be8

Edit this page Report a problem