Unity Shaders: Spherical Mask Dissolve
Welcome to the final post in our Dissolve Effect series!
I'm going to show you how to combine the dissolve shader and the spherical mask from the previous posts.
If you take a look at the SphericalMaskDissolve shader file, you see that at line 54-55, I compute the dissolveAmount just like I did in the spherical mask example.
Then at line 58 I sample the values from the noise texture just like I did in the dissolve shader sample. I also animate the noise texture to give some dynamics to the dissolve effect even when the player is not moving.
Next, at line 60 I subtract the dissolveAmount value from the sampled values coming from the noise texture just like I did in the dissolve shader example.
Finally at line 62, I use the dissolve value I have just computed to discard the pixels.
And this is how I've combined the two shaders from the previous article to get the effect you see in the above gif image.
You can download the examples from my repository on Github.
I'm going to show you how to combine the dissolve shader and the spherical mask from the previous posts.
If you take a look at the SphericalMaskDissolve shader file, you see that at line 54-55, I compute the dissolveAmount just like I did in the spherical mask example.
Then at line 58 I sample the values from the noise texture just like I did in the dissolve shader sample. I also animate the noise texture to give some dynamics to the dissolve effect even when the player is not moving.
Next, at line 60 I subtract the dissolveAmount value from the sampled values coming from the noise texture just like I did in the dissolve shader example.
Finally at line 62, I use the dissolve value I have just computed to discard the pixels.
And this is how I've combined the two shaders from the previous article to get the effect you see in the above gif image.
You can download the examples from my repository on Github.