Portal Shaders in Unity
Portals are something that is used quite often in games in order to allow users to travel to different locations quickly. They also give us an opportunity to see how we can utilize time to adjust our shaders and utilize both the Twist and Voronoi nodes to great effect.
Getting ready
Ensure that you have created a project using one of the scriptable render pipelines mentioned in the Creating a URP-based Shader Graph project recipe in Chapter 13, Shader Graph – 2D. For the purposes of this chapter, we will be using the HDRP, so you can select High Definition RP/3D Sample Scene (HDRP) instead of the URP options when creating the new project. Afterward, complete the following steps:
- Create a new scene, if you haven't done so already, by going to File | New Scene.
- Afterward, we need to have something to show our shader, so let's create a new plane by going to GameObject | 3D Object | Plane. Then, rotate the plane to face the camera...