Unity Shader: Spherical Mask
I'm a big fan of Beyond Eyes game and the way the world takes form while the little girl walks around. Last time we looked at the dissolve effect this time we take a look at Spherical Mask effect. The two effects combined together will let us create a custom shader that emulates the Beyond Eyes effect. Let's begin! Spherical Mask The image above is pretty self explanatory, we have a player object that has a radius of action, every pixels inside its radius of action will be colored while the others stay in grayscale. Let's begin with adding two input propeties to our shader: 1 2 3 4 5 6 7 8 9 Properties { //...other shader properties //Spherical Mask properties _PlayerPosition( "Player Position" , Vector) = ( 0 , 0 , 0 , 0 ) _Radius( "Mask Radius" , Range( 0 , 100 )) = 0 _Softness( "Mask Softness" , Range( 0 , 100 )) = 0 } _PlayerPosition passes the player postion to the shader _Radius is the player radius