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

Photoshop levels effect

If you have ever done any sort of image editing, such as touching up a family photograph, making game textures, or digitally painting a picture, we are sure you understand the power of having levels to globally adjust your entire image. Well, it is completely possible to create Photoshop-like effects inside your Shaders as well.

All the different image editing tools and blending modes that you find in Photoshop are all described with a set of math operations. Ultimately, we are multiplying, adding, subtracting, and comparing pixel values with some other value, to finally get a return value. This return value then becomes the new pixel color in the image you're editing.

While we could write a whole book on just the different ...

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