# 모서리가 둥근 사각형 만들기

둥근 사각형은 게임뿐만 아니라 일반적인 앱UI나 아이콘에서도 많이 사용되고 있습니다. 여기서는 셰이더를 사용하여 게임 UI에 적용할 수 있는 방법에 대해서 설명하겠습니다.

#### 필요한 배경지식

* 유니티 엔진
* 셰이더 프로그래밍
* 벡터의 덧셈과 뺄셈
* 상상력

![](/files/-LqRMVnmknRka4FVjXvD)

배경지식이 충분하지 않더라도 약간의 상상력만 있다면 크게 어렵지 않습니다.

소스코드를 바로 보고 싶으신 분은 아래 github에서 확인하시면 됩니다.

{% embed url="<https://github.com/sunduk/UnityRoundedShader>" %}
유니티 엔진으로 구현한 모서리가 둥근 사각형 전체 소스코드
{% endembed %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://lee-seokhyun.gitbook.io/game-programming/client/shader/roundedrect_shader.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
