이 페이지에는 빌트인 렌더 파이프라인에서 커맨드 버퍼를 사용하는 방법에 대한 정보가 있습니다. 스크립터블 렌더링 파이프라인을 기반으로 하는 렌더 파이프라인에서 커맨드 버퍼를 사용하는 방법에 대한 정보는 스크립터블 렌더링 파이프라인에서 렌더링 커맨드 예약 및 실행을 참조하십시오.
커맨드 버퍼에는 렌더링 커맨드 리스트(예: 렌더 타겟 설정, 특정 메시 그리기)가 있습니다. 빌트인 렌더 파이프라인의 다양한 지점에서 이러한 커맨드를 예약하고 실행하여 Unity의 렌더링 기능을 커스터마이즈하고 확장할 수 있습니다.
Graphics.ExecuteCommandBuffer API를 사용하여 커맨드 버퍼를 즉시 실행하거나, 예약을 통해 렌더 파이프라인의 특정 지점에서 발생하도록 만들 수 있습니다. 커맨드 버퍼를 예약하려면 Camera.AddCommandBuffer API와 함께 CameraEvent 열거형을 사용하고, Light.AddCommandBuffer API와 함께 LightEvent 열거형을 사용하십시오. 이런 방식으로 예약된 커맨드 버퍼를 Unity가 실행하는 시기를 확인하려면 CameraEvent 및 LightEvent 실행 순서를 참조하십시오.
커맨드 버퍼를 사용하여 실행할 수 있는 전체 커맨드 리스트는 CommandBuffer API 문서를 참조하십시오. 단, 일부 커맨드는 특정 하드웨어에서만 지원됩니다. 예를 들어 레이트레이싱과 관련된 커맨드는 DX12에서만 지원됩니다.
Unity 블로그 포스트 Unity 5 렌더링 파이프라인 확장: 커맨드 버퍼는 빌트인 렌더 파이프라인의 커맨드 버퍼를 소개합니다. 또한 커맨드 버퍼를 사용하여 여러 다양한 효과를 구현하는 방법에 대한 설명과 샘플 프로젝트와 예제 코드도 제공합니다. 이 프로젝트는 예전 Unity 버전용으로 제작되었지만, 기본 원리는 동일합니다.
CameraEvent의 실행 순서는 프로젝트에서 사용하는 렌더링 경로에 따라 다릅니다.
디퍼드 렌더링 경로
포워드 렌더링 경로
위의 “그림자 렌더링” 단계 동안 그림자를 드리우는 각 광원에 대해 Unity는 다음 단계를 수행합니다.
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.