유니티 Multi Pass와 Single Pass Instanced/Multi View에 대해

Project Setting

 

VR작업을 하다보면 초반 세팅하는 부분에 한 번씩쯤 다들 봤을 것입니다.

Rendering Mode에 보면 Multi Pass와 Single Pass Instanced , 모바일의 경우 Multi View가 존재합니다.

 

이 3개의 차이는 아래 표와 같습니다.

기능 Multipass (다중 패스) Single Pass Instanced Multiview
렌더링 방식 여러 개의 렌더 패스를 사용하여 화면을 그립니다. 단일 렌더 패스에서 모든 드로우 콜을 인스턴스화된 드로우 콜로 교체합니다. 단일 렌더 패스에서 모든 드로우 콜을 처리합니다.
효율성 느림 (여러 번의 렌더링 작업이 필요) CPU 사용량: 크게 감소, GPU 사용량: 소폭 감소 CPU 사용량: 적게 줄지만 GPU 사용량은 미세하게 개선됩니다.
사용 예시 고급 그래픽 효과, 복잡한 렌더링 작업 PC VR 게임 (OpenGL을 사용하는) 모바일 VR 게임

 

출처 - https://blog.unity.com/engine-platform/how-to-maximize-ar-and-vr-performance-with-advanced-stereo-rendering

 

 

말로 풀어보면 다음과 같습니다.

 

Multi Pass는 왼쪽/오른쪽 카메라에 한 번씩 렌더링 하여 총 2번 렌더링 된다고 생각하시면 됩니다.

 

Single Pass Instanced는 왼쪽 카메라에 한 번 렌더링된 것을 오른쪽 카메라에 그대로 복사 붙여넣기 하여 사용한다고 생각하면 됩니다. 왼쪽 카메라에서만 한 번 렌더링되고 오른쪽 카메라에서는 왼쪽 카메라에서 작업된(인스턴스화된) 것을 보는 것이므로 렌더링 비용이 감소한다는 뜻입니다.

 

Multiview의 경우 Open GL혹은 Open GL ES 장치를 사용하는 곳에 지원하는 기능이고 Single Pass Instanced와 같다고 생각하시면 됩니다.

 

PC냐 모바일이냐 그 차이라고 생각하시면 편합니다.


 

참고 자료

 

Unity - Manual: Stereo rendering

Universal Render Pipeline compatibility in XR Single-pass instanced rendering and custom shaders Stereo rendering VR and most MRMixed RealitySee in Glossary devices require rendering the Unity sceneA Scene contains the environments and menus of your game.

docs.unity3d.com

 

 

How to maximize AR and VR performance with advanced stereo rendering | Unity Blog

In order to render the view for each eye, the simplest method is to run the render loop twice. Each eye will configure and run through its own iteration of the render loop. At the end, we will have two images that we can submit to the display device. The u

blog.unity.com

 

 

Using Single Pass Stereo Rendering and Stereo Instancing | Oculus Developers

 

developer.oculus.com