alelievr / HDRP-UI-Camera-Stacking

Optimized implementation of camera stacking for UI only in HDRP.
MIT License
181 stars 22 forks source link

Changing aspect ratio? #17

Open AbandonedSoul opened 2 years ago

AbandonedSoul commented 2 years ago

Hi

Thanks for the great package! But there is one problem I've encountered, the UI do not display on the same view rect as main camera. If I change the view rect at runtime, the UI still displays on the old one and becomes stretched. Is there anyway to force HDRP UI Camera to keep the same view rect as main camera?

alelievr commented 2 years ago

Hello,

Right now there is nothing that allows keeping the same aspect ratio between the two cameras. The way the code is designed makes it impossible to know which UI Camera will go into which camera, so we can't adjust the aspect ratio on the fly as we don't know the target camera.