To begin with, we will launch our new shader file that we just created and enter the code mentioned in the following steps:
- The shader will need two new properties that will allow us to control the speed of the texture scrolling. So, let's add a speed property for the X direction and a speed property for the Y direction, as shown in the following code:
Properties { _Color ("Color", Color) = (1,1,1,1) _MainTex ("Albedo (RGB)", 2D) = "white" {} _ScrollXSpeed ("X Scroll Speed", Range(0,10)) = 2 _ScrollYSpeed ("Y Scroll Speed", Range(0,10)) = 2 }
- When working in ShaderLab, Properties has a syntax that looks like the following:
Properties{ _propertyName("Name in Inspector", Type) = value}
Each property contained in the Properties ...