location
On this page

location

Type

A shader IO location of type T, at the number written: uv: location<0, vec2>.

The signature, the sentence and any message are the compiler's own text at commit af54ddad5.

Syntax

type location<I extends number, T, O extends { readonly interpolate?: 'perspective' | 'linear' | 'flat' | readonly [type: 'perspective' | 'linear' | 'flat', sampling: 'center' | 'centroid' | 'sample' | 'first' | 'either']; readonly blend_src?: 0 | 1 } = {}> = T

Parameters

  • I number
  • T
  • O optional { readonly interpolate?: 'perspective' | 'linear' | 'flat' | readonly [type: 'perspective' | 'linear' | 'flat', sampling: 'center' | 'centroid' | 'sample' | 'first' | 'either']; readonly blend_src?: 0 | 1 }

Description

An input or output that writes none, uv: vec2, takes its location from the compiler; write location<n, T> to fix the number or to carry an option. Options: { interpolate: "flat" } or { interpolate: ["linear", "centroid"] }, and { blend_src: 0 | 1 } on a field of a dual-source fragment output struct.

Examples

See also

Edit this page Report a problem