O'Reilly logo

Unity Shaders and Effects Cookbook by Kenny Lammers

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Scrolling textures by modifying UV values

One of the most common texture techniques used in today's game industry is the process of allowing you to scroll their textures over the surface of an object. This allows you to create effects such as waterfalls, rivers, lava flows, and so on. It's also a technique that is the basis for creating animated sprite effects, but we will cover that in a subsequent recipe of this chapter. Let's first see how we will create a simple scrolling effect inside of a Surface Shader.

Getting ready

To begin this recipe, you will need to create a new Shader file and a new Material. This will set us up with a nice clean Shader that we can use to study the scrolling effect by itself.

How to do it…

To begin with, we will launch ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required