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>매개변수
xReadonlyNode<K>
반환값
Node<K>
예외
SD0109Like 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) | 지원 |
|
| GLSL ES 3.00 (WebGL2) | 지원 |
|
| CPU 오라클 | 스텁 | The oracle has no texture memory and no neighbouring fragments. The call throws unless the module was compiled with |
관련 가이드
함께 보기
소스
src/core/ir/node.ts, 2243행, 커밋 c66579bf 기준