Shader/



Unity Depth Wave Shader


This demo shows a depth wave effects moving from far to near across the space while an architecture changing it look.It involves two shaders and one script.One shader does the light wave effects.One shader implement how the building changes the color when touched by the depth wave.The script manages the parameters of related materials in real-time.

img

img

The controller script manages the overall depth wave effects and related materials' values.Its parameters are as below:

1.Mat:Define the material that will be used to render the depth wave effects.

2.mat_atlas_01,mat_alas_02,mat_flag:Setup materials that will be controlled by this script in real-time.

3.Swtich Distance:Position of the depth wave effects,affected by time.

4.Ring Width:Width of the depth wave effects.

5.Speed:How fast the depth wave effects moves back and forth.

img

The stadium's material parameters in Unity Inspector looks like this:

1.Albedo:The original texture.

2.Second Texture:The texture that will be gradually changed to when the depth wave effects passes.

3.Distortion Map:Make an irregular shape of the border between two textures while they are swtiching.

4.Switch Distance:It is controlled by time,and should be identical with the value setup in depth wave effects material.






*Declaration:
Models and textures used in this article are assets from "Final Fantasy Type-0 Online" by FreeJoy Studios at Perfect World.

Technical Artist Sen Wu

Copyright © 2016-2021 abanks.cc