Glitching with multiple cameras LWRP

Hey so I use 3 camera with 2 being Depth only and the last being a solid color. This worked fine up until I started using the LWRP. I’ve tried searching a few topics about this and trying a few things but I can’t figure it out. If anyone else has any ideas regarding this I’d really appreciate it

https://drive.google.com/file/d/1ezqy8IUmW2uLHEholuIaHK-UnCjV4Gat

LWRP and HDRP don’t support multiple layered cameras. Github Changelog

This was changed/updated for SRP versions 4.2.0 and above.

2 Likes

Ah okay I guess that explains it. I appreciate the reply :slight_smile:

1 Like

Does that mean I also won’t be able to use cameras with different Viewport Rects, like an extra camera rendering an object in a corner? Also, are they taking that out for good or do they plan to bring it back in at some point?

1 Like

Update: this answered my question about Viewport Rects HDRP Camera ViewportRect broken?

wait, what? this breaks known rendering techniques for post fx in AR. weird decision…

Hi, I’ve written a quick doc to explain why Camera Stacking is not supported in LWRP:

5 Likes

Let me know what you need in terms of postfx in AR so I can provide you a workflow that works.

What about rendering of huge worlds in the space simulators? For example I have three cameras one with near/far clip planes 1 - 5000, second - 5000-100000, and the third one is rendering scaled space. So, how to properly implement this in the LWRP?

6 Likes

What about if I want to use a orhto camera on top of a perspective camera for a 2.5D game?

Is that still possible without camera stacking?

1 Like

up

up

Why would you actually need multiple cameras for that?

Can’t you just make those further out planet offset their locations with the camera so they follow it and don’t get any closer. I’d suggest faking the planet scale so you can have planets closer to camera in scene to avoid floating point issues. You should be able to achieve similar result as with multiple cameras but more efficiently.

If you launch your spaceship from the surface of planet with 600km radius (1/10 of the actual Earth and almost 1/2 of the Moon), even 50 km far clip plane is not enough for distant view and you already have z-buffer precision issues like z-fighting or inaccurate results when calculating atmospheric scattering. 2 cameras solved this very easily. I want to know how to solve this with one camera setup.

4 Likes

How to render geometry that requires special camera setup

Users need to create a ScriptableRenderPass and inject in LWRP code to render things that require different camera matrices/fov. These vary on a case by case scenario, f.ex, rendering weapons in an FPS.

This is worrying me, it sounds so complicated, that the end result is that will not be using LWRP but stay with unity classic render pipeline, is that not backwards of the goal of helping users get better performance?

I need two cameras with different perspectives on top of each other. and I don’t like it if the option is talken away.

Just keep it in there with a warning use at your own risk.

Or make the requered injected render pass for us, because I can’t program a render pass but I can stack two cameras.

Please put my worries to rest, and clarify how it will work for someone who is not a programmer

5 Likes

thanks for sharing your cases and concerns. We are taking them very seriously. We agree we have to provide an alternative that’s about as easy to setup as an additional camera. We are discussing about it atm.

I’ll also want to reassure you that we are still leaving the built-in render pipelines as options for games that require features not supported by SRP.

3 Likes

Thanks thats good to hear! really appreaciate that these use cases are taken in consideration.

Thanks thats brilliant!

I man not sure if I understand the issue correctly. Does that mean with the current LWRP we cannot do things such as a split-screen with two cameras or an inventory window that renders 3d obejcts over the regular game camera?
If not, would rendering the cameras to a render texture serve as a work-around?

2 Likes

@Holy-Manfred Split-screens should work the same as before, issue here is mainly stacking multiple cameras into same view. In splitscreen you just render the camera views side by side, the whole setup is different.