[Solved already then accidentally posted] Layering viewports for extra-far render distance

If you’re layering viewports, scale up your skybox to only fit in your furthest viewport or it’ll render over the far viewports.

What is “Layering Viewports”? It sounds interesting, but, I’m having trouble visualizing what it is or what you’re doing. Are you rendering a scene with a far/distant focal length to a buffer (with a distant near and far view frustum cut-off) and then rendering the same scene again with a near focal length and a near near and far view frustum cut-off to the same buffer? And you need to make sure the sky box is larger than the far focal length far view frustum?

You can attach the skybox only to the first viewport, instead of both, then you don’t have to make it fit anything.

1 Like

I just tried that, the skybox just isn’t rendered at all if it’s done this way. I’m assuming it has to do with the Sky material’s vertex shader. Iirc it moves it into a small space around the camera that’s never culled, so it’s rendered too close to the camera to be visible in a viewport whose near frustum is >100 units or so. I might be wrong about that though, and obviously you’d know better than me if that’s the case lol

I messed around with viewports a few days ago and I didn’t see any problems of this sort. I attached the skybox only to the bottom most one and rendered transparent ones on top with no issue at all. Not entirely sure what could go wrong here.

The depth for the skybox is locked at 1. Meaning, its always the farthest thing ever, no matter what.