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

Profiling your Shaders

Now that we know how we can reduce the overhead that our Shaders might take up, let's take a look at how to find problematic Shaders in a scene where you might have a lot of Shaders, or a lot of objects, Shaders, and scripts, all running at the same time. To find a single object or a single Shader among a whole game can be quite daunting, but Unity provides us with its built-in Profiler. This allows us to actually see on a frame-by-frame basis what is happening in the game, and lets us see each item being used by the GPU and the CPU.

Using the Profiler we can isolate only items such as Shaders, geometry, and general rendering items by using their interface to create blocks of profiling jobs. We can filter out items till we ...

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