Lets make a door!
The video above has been discussed in one of my previous posts, however one part of it that i didn't discuss is the visual effect on the portals. When creating this effect I wanted to recreate the retro style of having a portal from a main room leading to different locations with a wave portal style effect. My plan to do this involved two different shaders.
1. the first shader the player would see is a standard dissolve shader. I used the dissolve to allow me to show that the portal "opens" when the player gets close enough to it. To do this I used code to work out the magnitude from the player to the portal and then changed the dissolve amount based on the size of the magnitude with the dissolve amount being smaller the greater the magnitude was.
2. The second shader I used created a fairly simple wave effect by changing the vertex offset position and the colour at individual uv coordinates based on a sine wave that moves and changes with time.