textureDimensions
이 페이지에서

textureDimensions()

함수, 내장 함수 분류

Texture extent in texels, as a vec2<u32>.

import { textureDimensions } from 'typeshade'

시그니처, 설명, 예제는 커밋 c66579bf의 컴파일러 소스에서 그대로 가져온 영어 원문입니다.

구문

const textureDimensions: (
tex: ReadonlyNode<TextureLoad2dKey | TextureLoadArrayKey>,
) => Node<"vec2<u32>">

매개변수

tex ReadonlyNode<TextureLoad2dKey | TextureLoadArrayKey>

반환값

Node<'vec2<u32>'>

설명

A 2D array texture reports its width and height the same way; the layer count is the separate textureNumLayers query. An integer texture is accepted too, since an extent does not depend on the texel element. On GLSL ES 3.00 the ivec3 that textureSize returns for an array is truncated to the two extent components. Bind the result with Let when it is read more than once per invocation.

대상별 지원

대상지원비고
WGSL (WebGPU) 지원

textureDimensions(tex).

GLSL ES 3.00 (WebGL2) 지원

uvec2(textureSize(tex, 0)).

CPU 오라클 스텁

The oracle has no texture memory and no neighbouring fragments. The call throws unless the module was compiled with { gpuStubs: true }, which returns a placeholder.

관련 가이드

함께 보기

소스

src/core/ir/node.ts, 2193행, 커밋 c66579bf 기준

이 페이지 편집 문제 보고