커맨드 버퍼에는 렌더링 커맨드 리스트가 있습니다. Unity에서 렌더링 커맨드를 예약 및 실행하도록 명령할 수 있습니다.
이 페이지에는 빌트인 렌더 파이프라인에서 커맨드 버퍼를 사용하는 방법에 대한 정보가 있습니다. 스크립터블 렌더링 파이프라인에서 커맨드 버퍼를 사용하는 방법에 대한 정보는 스크립터블 렌더링 파이프라인에서 렌더링 커맨드 예약 및 실행을 참조하십시오.
커맨드 버퍼를 사용하여 실행할 수 있는 전체 커맨드 리스트는 CommandBuffer API 문서를 참조하십시오. 단, 일부 커맨드는 특정 하드웨어에서만 지원됩니다. 예를 들어 레이트레이싱과 관련된 커맨드는 DX12에서만 지원됩니다.
Graphics.ExecuteCommandBuffer API를 사용하여 커맨드 버퍼를 즉시 실행할 수 있습니다.
빌트인 렌더 파이프라인에서 렌더링 루프의 특정 시점에서 커맨드 버퍼를 실행하도록 예약할 수 있습니다. 커맨드 버퍼를 예약하려면 Camera.AddCommandBuffer API와 함께 CameraEvent enum, 그리고 Light.AddCommandBuffer API와 함께 LightEvent enum을 사용하십시오.
예를 들어 AfterGBuffer CameraEvent가 포함된 커맨드 버퍼를 사용하면 파이프라인이 모든 불투명 게임 오브젝트를 처리한 후 추가 게임 오브젝트를 디퍼드 파이프라인으로 렌더링할 수 있습니다.
실행 순서는 프로젝트에서 사용하는 렌더링 경로에 따라 다릅니다.
디퍼드 렌더링 경로 | |
---|---|
BeforeGBuffer | |
Unity가 불투명 지오메트리를 렌더링합니다. | |
AfterGBuffer | |
Unity가 뎁스를 확인합니다. | |
BeforeReflections | |
Unity가 기본 반사를 렌더링합니다. | |
Unity가 반사 프로브 굴절을 렌더링합니다. | |
AfterReflections | |
Unity가 G버퍼의 이미시브 채널에 반사를 복사합니다. | |
BeforeLighting | |
Unity가 그림자를 렌더링합니다. LightEvent 실행 순서를 참조하십시오. | |
AfterLighting | |
BeforeFinalPass | |
Unity가 최종 패스를 처리합니다. | |
AfterFinalPass | |
BeforeForwardOpaque(디퍼드 렌더링을 사용하여 렌더링할 수 없는 불투명 지오메트리가 있는 경우에만 호출됨) | |
Unity가 디퍼드 렌더링을 사용하여 렌더링할 수 없는 불투명 지오메트리를 렌더링합니다. | |
AfterForwardOpaque(디퍼드 렌더링을 사용하여 렌더링할 수 없는 불투명 지오메트리가 있는 경우에만 호출됨) | |
BeforeSkybox | |
Unity가 스카이박스를 렌더링합니다. | |
AfterSkybox | |
Unity가 헤일로를 렌더링합니다. | |
BeforeImageEffectsOpaque | |
Post-processing Stack V2 패키지를 사용할 경우, Unity가 불투명 전용 포스트 프로세싱 효과를 적용합니다. | |
AfterImageEffectsOpaque | |
BeforeForwardAlpha | |
Unity가 투명 지오메트리와 Screen Space - Camera 렌더링 모드의 UI 캔버스를 렌더링합니다. | |
AfterForwardAlpha | |
BeforeHaloAndLensFlares | |
Unity가 렌즈 플레어를 렌더링합니다. | |
AfterHaloAndLensFlares | |
BeforeImageEffects | |
Post-processing Stack V2 패키지를 사용할 경우, Unity가 포스트 프로세싱 효과를 적용합니다. | |
AfterImageEffects | |
AfterEverything | |
Unity가 렌더링 모드가 Screen Space - Camera가 아닌 UI 캔버스를 렌더링합니다. |
포워드 렌더링 경로 |
---|
BeforeDepthTexture |
Unity가 불투명 지오메트리의 뎁스를 렌더링합니다. |
AfterDepthTexture |
BeforeDepthNormalsTexture |
Unity가 불투명 지오메트리의 뎁스 노멀을 렌더링합니다. |
AfterDepthNormalsTexture |
Unity가 그림자를 렌더링합니다. LightEvent 실행 순서를 참조하십시오. |
BeforeForwardOpaque |
Unity가 불투명 지오메트리를 렌더링합니다. |
AfterForwardOpaque |
BeforeSkybox |
Unity가 스카이박스를 렌더링합니다. |
AfterSkybox |
Unity가 헤일로를 렌더링합니다. |
BeforeImageEffectsOpaque |
Post-processing Stack V2 패키지를 사용할 경우, Unity가 불투명 전용 포스트 프로세싱 효과를 적용합니다. |
AfterImageEffectsOpaque |
BeforeForwardAlpha |
Unity가 투명 지오메트리와 Screen Space - Camera 렌더링 모드의 UI 캔버스를 렌더링합니다. |
AfterForwardAlpha |
BeforeHaloAndLensFlares |
Unity가 렌즈 플레어를 렌더링합니다. |
AfterHaloAndLensFlares |
BeforeImageEffects |
Post-processing Stack V2 패키지를 사용할 경우, Unity가 포스트 프로세싱 효과를 적용합니다. |
AfterImageEffects |
AfterEverything |
Unity가 Screen Space - Camera 렌더링 모드의 UI 캔버스를 렌더링합니다. |
위의 “그림자 렌더링” 단계 동안 그림자를 드리우는 각 광원에 대해 Unity는 다음 단계를 수행합니다.
BeforeShadowMap | |
BeforeShadowMapPass Unity가 현재 패스의 모든 섀도우 캐스터를 렌더링합니다. AfterShadowMapPass |
각 패스에 대해 반복합니다. |
AfterShadowMap | |
BeforeScreenSpaceMask | |
Unity가 섀도우 맵을 스크린 공간 버퍼로 수집하고 필터링을 수행합니다. | |
AfterScreenSpaceMask |
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.