Scalar
타입, 타입 분류
The four native scalar kinds: the ones WGSL and GLSL ES 3.00 both represent directly in hardware, and the set a ShaderType of kind: 'scalar' can carry.
import type { Scalar } from 'typeshade'
시그니처, 설명, 예제는 커밋 c66579bf의 컴파일러 소스에서 그대로 가져온 영어 원문입니다.
구문
type Scalar = 'f32' | 'i32' | 'u32' | 'bool';설명
When a binary operator
mixes two of them, the result follows the native promotion order f32 > i32 > u32. Emulated double precision is a separate ShaderType kind, f64T, so it never enters
native promotion and every code path that switches on the scalar kind decides about it
separately (see ShaderType).
함께 보기
소스
src/core/ir/types.ts, 18행, 커밋 c66579bf 기준