vec2i()
함수, 내장 함수 분류
A vec2<i32> constructor, WGSL-style: vec2i(x, y).
import { vec2i } from 'typeshade'
시그니처, 설명, 예제는 커밋 c66579bf의 컴파일러 소스에서 그대로 가져온 영어 원문입니다.
구문
const vec2i: (...a: NodeLike[]) => Node<"vec2<i32>">매개변수
...aNodeLike[]
반환값
Node<'vec2<i32>'>
설명
Bare number components lift to i32,
the type of the integer texel coordinate textureLoad takes
(vec2i(toI32(...), toI32(...))).
예제
예제
import { vec2i, toI32, f32T, fn } from 'typeshade'
const coord = fn('coord', { u: f32T, v: f32T }, ({ u, v }) => vec2i(toI32(u), toI32(v)))관련 가이드
함께 보기
소스
src/core/ir/node.ts, 2548행, 커밋 c66579bf 기준