- Home /
How to make the Skybox visible only through a window?
Hi Guys,
Is it possible to make the skybox visible only through a window like object?
I'm trying to make a portal kind of thing with ARKit.
I'm using Depth mask to hide the objects behind
So it actually looks like this
The problem here is, the AR Camera needs to be cleared with depth only and so the skybox inside the portal is not visible.
After passing through the portal I can make the camera to clear skybox but before entering into the portal I need to see the skybox.
Is there any way to make the skybox visible with shaders or somehow?
I hope you understand my question.
Thank you
Answer by x4637x · Aug 04, 2017 at 07:12 AM
I think what you are talking about is something like this : Fake Interior Check out the "Fake Interior" in that link.
Thank you for your response. But I don't want to use Render Texture as it needs a second camera or if we use a normal image it doesn't looks realistic. So I just need a shader which can show custom skybox ins$$anonymous$$d of regular skybox.
Then there is nothing else I can help you with, I know very few about shader and skybox. Good luck solving that out.
Answer by Dragantium · Nov 27, 2020 at 02:30 PM
Use skybox in the camera, and select the one you need in the render texture
Answer by Envans · Nov 27, 2020 at 02:59 PM
Here is a GREAT youtube channel with low subscribers and relatively not known https://www.youtube.com/channel/UCQrD9U5-jVdmzF2Bt7cjtNg he makes great tutorials very professional and well versed. He has a skybox with clouds shader tutorial video that you can check. Good luck with your project.
I just noticed the question is from 2017. For anyone looking for a solution to these you add the shader material to a plane and make it seem like its a "window" then you can fade the plane out when you pass through it or something similar.
Your answer
Follow this Question
Related Questions
Use Skybox material on Cube 0 Answers
Portal between scenes? 3 Answers
Unity URP Skybox shader Graph not wrapping properly 1 Answer
Another question about portals... 0 Answers
Depth mask shader and Unity shadows 0 Answers