dpdx
이 페이지에서

dpdx()

함수, 내장 함수 분류

dpdx(x): the screen-space partial derivative of x along the X axis, component-wise.

import { dpdx } from 'typeshade'

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

구문

const dpdx: <K extends FloatKey>(x: ReadonlyNode<K>) => Node<K>

매개변수

x ReadonlyNode<K>

반환값

Node<K>

예외

SD0109

Like fwidth it exists only on the GPU and only in a fragment shader; the fragment-only-builtin lint rule reports SD0109 elsewhere.

설명

Like fwidth it exists only on the GPU (the CPU evaluation returns 0) and only in a fragment shader; the fragment-only-builtin lint rule reports SD0109 elsewhere. Spelled dpdx on WGSL and dFdx on GLSL ES 3.00; dpdy is the Y-axis partner.

대상별 지원

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

dpdx(x).

GLSL ES 3.00 (WebGL2) 지원

dFdx(x).

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, 2243행, 커밋 c66579bf 기준

이 페이지 편집 문제 보고