Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Unity 2018 Shaders and Effects Cookbook

You're reading from   Unity 2018 Shaders and Effects Cookbook Transform your game into a visually stunning masterpiece with over 70 recipes

Arrow left icon
Product type Paperback
Published in Jun 2018
Publisher
ISBN-13 9781788396233
Length 392 pages
Edition 3rd Edition
Languages
Tools
Concepts
Arrow right icon
Authors (2):
Arrow left icon
John P. Doran John P. Doran
Author Profile Icon John P. Doran
John P. Doran
Alan Zucconi Alan Zucconi
Author Profile Icon Alan Zucconi
Alan Zucconi
Arrow right icon
View More author details
Toc

Table of Contents (14) Chapters Close

Preface 1. Post Processing Stack 2. Creating Your First Shader FREE CHAPTER 3. Surface Shaders and Texture Mapping 4. Understanding Lighting Models 5. Physically-Based Rendering 6. Vertex Functions 7. Fragment Shaders and Grab Passes 8. Mobile Shader Adjustment 9. Screen Effects with Unity Render Textures 10. Gameplay and Screen Effects 11. Advanced Shading Techniques 12. Shader Graph 13. Other Books You May Enjoy

Creating a toon shader

One of the most used effects in games is toon shading, which is also known as celluloid (CEL) shading. It is a non-photorealistic rendering technique that makes 3D models appear flat. Many games use it to give the illusion that the graphics are being hand-drawn rather than being 3D modeled. You can see, in the following diagram, a sphere rendered with a toon Shader (left) and a Standard Shader (right):

Achieving this effect using just surface functions is not impossible, but it would be extremely expensive and time consuming. The surface function, in fact, only works on the properties of the material, not its actual lighting condition. As toon shading requires us to change the way light reflects, we need to create our custom lighting model instead.

Getting ready...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime