---
title: "dpdy(): typeshade/core/ir의 IR 빌더 함수, TypeShade 컴파일러 API"
description: "dpdy, typeshade/core/ir의 IR 빌더 함수입니다. dpdy(x): x의 화면 공간 편미분을 Y축 방향으로 구합니다. 성분별로 적용하며, dpdx의 짝입니다. GPU 전용과 프래그먼트 전용이라는 제약도 같습니다."
url: https://typeshade.dev/ko/api/dpdy/
language: ko
---

# `dpdy()`

함수, 내장 함수 분류

`dpdy(x)`: x의 화면 공간 편미분을 Y축 방향으로 구합니다. 성분별로 적용하며, dpdx의 짝입니다. GPU 전용과 프래그먼트 전용이라는 제약도 같습니다.

`import { dpdy } from 'typeshade/core/ir'`

이 export는 IR 노드를 반환합니다. `"use typeshade"` 파일에서는 내장 함수 자체를 부릅니다: [`dpdy()`](https://typeshade.dev/ko/reference/functions/dpdy/)

설명은 커밋 af54ddad5의 검토된 컴파일러 문서를 번역한 것입니다. 시그니처와 예제 코드는 원문을 따르며, 필요한 경우 설명에 편집상 수정이 반영됩니다.

## 구문

```ts
const dpdy: <K extends FloatKey>(x: ReadonlyNode<K>) => Node<K>
```

## 매개변수

**`x` `ReadonlyNode<K>`**

## 반환값

`Node<K>`

## 설명

WGSL에서는 `dpdy`, GLSL ES 3.00에서는 `dFdy`로 씁니다.

## 예제

### 예제

```ts
import { fn, dpdy, f32T } from 'typeshade/core/ir'

const dv = fn('dv', { v: f32T }, ({ v }) => dpdy(v))
```

## 대상별 지원

| 대상 | 지원 | 비고 |
| --- | --- | --- |
| WGSL (WebGPU) | 지원 | `dpdy(x)`. |
| GLSL ES 3.00 (WebGL2) | 지원 | `dFdy(x)`. |
| CPU 오라클 | 스텁 | 오라클에는 텍스처 메모리가 없고 이웃 프래그먼트도 없습니다. `{ gpuStubs: true }` 옵션으로 모듈을 컴파일하지 않았다면 이 호출은 예외를 던집니다. 이 옵션을 켜면 플레이스홀더 값을 돌려줍니다. |

## 관련 가이드

- [레이아웃과 리소스](https://typeshade.dev/ko/guide/internals/layouts-and-resources/)
- [CPU 오라클 안내서](https://typeshade.dev/ko/guide/internals/the-cpu-oracle/)

## 함께 보기

- [`dpdy()`](https://typeshade.dev/ko/reference/functions/dpdy/)
- [`dpdx`](https://typeshade.dev/ko/api/dpdx/)

## 소스

[`src/core/ir/node.ts`, 1993행](https://github.com/typeshade/typeshade/blob/af54ddad5/src/core/ir/node.ts#L1993), 커밋 af54ddad5 기준
