One of the most common texture techniques used in today's game industry is the process of allowing you to scroll the textures over the surface of an object. This allows you to create effects such as waterfalls, rivers, and lava flows. It's also a technique that is the basis of creating animated sprite effects, but we will cover this in a subsequent recipe of this chapter. First, let's see how we will create a simple scrolling effect in a Surface Shader.
Scrolling textures by modifying UV values
Getting ready
To begin this recipe, you will need to create a new shader file (ScrollingUVs) and material (ScrollingUVMat). This will set us up with a nice clean shader that we can use to study the scrolling effect by...