TexelKey
타입, 타입 분류
The vec4<…> key a texel load from texture key K yields: the loaded element is the element in the texture key, so texture_2d<u32> loads a vec4<u32>.
import type { TexelKey } from 'typeshade'
시그니처, 설명, 예제는 커밋 c66579bf의 컴파일러 소스에서 그대로 가져온 영어 원문입니다.
구문
type TexelKey<K extends string> = K extends `${string}<${infer E}>` ? `vec4<${E}>` : never;설명
Deriving it from the
key keeps the result type and the texture in step; a vec4<f32> result from an integer
texture, which both GPU compilers reject, cannot be written with textureLoad.
함께 보기
소스
src/core/ir/node.ts, 2130행, 커밋 c66579bf 기준