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

Creating procedural textures in the Unity editor

There are times when you want to dynamically create textures and modify their pixels at runtime, to produce different effects. These are usually called procedural texture effects. Instead of having to manually create some new texture inside an image editing application, you can create a set of pixels in a two-dimensional nature and apply that to a new texture. Then, take that new texture and pass it to the Shader itself to use in its calculations.

This technique can be very useful for painting onto an already-existing texture map, using a dynamically created texture map, to create some interaction between the gamer and the game environment. It can also be used as a decal type effect, or for creating ...

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