alelievr / HDRP-UI-Camera-Stacking

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

No split screen/screen rect support? #14

Closed davidkroukamp closed 2 years ago

davidkroukamp commented 2 years ago

I am making a split screen game using cinemachine, and all seems well, except that the HDRP UI Camera doesnt seem to account for the camera that its rendering Screen rect (as this has been halfed for each of my 2 cameras).

I've looked at the code, I assume I need to change the internal texture size (as Im using the automatic option) to something other then camera.pixelWidth and camera.pixelHeight? or is there another way?

alelievr commented 2 years ago

Hello, I pushed a change to simplify the split-screen setup: https://github.com/alelievr/HDRP-UI-Camera-Stacking/tree/1.3.0 You can take a look at the SplitScreen scene if you want an example. Also don't forget to have matching camera rects between the UI camera and main camera otherwise you'll experience streching

davidkroukamp commented 2 years ago

Thanks alot, will definitely give a it go as the clipping of my HUD right now when I'm close to objects just won't cut it for a release! Appreciate the effort!