How to do it...

To create this animated effect, you can start by refitting the shader. Follow these steps:

  1. Add the following properties:
_NoiseTex("Noise text", 2D) = "white" {}_Colour ("Colour", Color) = (1,1,1,1)_Period ("Period", Range(0,50)) = 1_Magnitude ("Magnitude", Range(0,0.5)) = 0.05_Scale ("Scale", Range(0,10)) = 1
  1. Add their respective variables to the second pass of the shader:
sampler2D _NoiseTex;fixed4 _Colour;float _Period;float _Magnitude;float _Scale;
  1. Define the following input and output structures for the vertex function:
struct vertInput {  float4 vertex : POSITION;  fixed4 color : COLOR;  float2 texcoord : TEXCOORD0;};struct vertOutput {  float4 vertex : POSITION;  fixed4 color : COLOR;  float2 texcoord : TEXCOORD0;

Get Unity 2018 Shaders and Effects Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.