f64Parts
On this page

f64Parts()

Function in Builtins

The (hi, lo) pair of an f64 as a plain vec2<f32>, for storing an f64 into a vec2 buffer field or stage output.

import { f64Parts } from 'typeshade'

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

Syntax

const f64Parts: (x: ReadonlyNode<"f64">) => Node<"vec2<f32>">

Parameters

x ReadonlyNode<'f64'>

Return value

Node<'vec2<f32>'>

Description

The (hi, lo) pair of an f64 as a plain vec2<f32>, for storing an f64 into a vec2 buffer field or stage output. It costs nothing, since an emitted f64 already is its pair; f64FromParts(v.x, v.y) restores it.

Targets

TargetSupportNotes
WGSL (WebGPU) Emulated

Rewritten by fp64Lower into a pair of f32 lanes before the backend runs.

GLSL ES 3.00 (WebGL2) Emulated

Rewritten by fp64Lower into a pair of f32 lanes before the backend runs.

CPU oracle Supported

Evaluated in f64 by the oracle.

Source

src/core/ir/node.ts, line 2396, at commit 26de7be8

Edit this page Report a problem