Book Image

Unity 5.x Shaders and Effects Cookbook

By : Zucconi
Book Image

Unity 5.x Shaders and Effects Cookbook

By: Zucconi

Overview of this book

Since their introduction to Unity, Shaders have been notoriously difficult to understand and implement in games: complex mathematics have always stood in the way of creating your own Shaders and attaining that level of realism you crave. With Shaders, you can transform your game into a highly polished, refined product with Unity’s post-processing effects. Unity Shaders and Effects Cookbook is the first of its kind to bring you the secrets of creating Shaders for Unity3D—guiding you through the process of understanding vectors, how lighting is constructed with them, and also how textures are used to create complex effects without the heavy math. We’ll start with essential lighting and finishing up by creating stunning screen Effects just like those in high quality 3D and mobile games. You’ll discover techniques including normal mapping, image-based lighting, and how to animate your models inside a Shader. We’ll explore the secrets behind some of the most powerful techniques, such as physically based rendering! With Unity Shaders and Effects Cookbook, what seems like a dark art today will be second nature by tomorrow.
Table of Contents (12 chapters)
11
Index

What this book covers

Chapter 1, Creating Your First Shader, introduces you to the world of shader coding in Unity 4 and 5.

Chapter 2, Surface Shaders and Texture Mapping, covers the most common and useful techniques that you can implement with Surface Shaders, including how to use textures and normal maps for your models.

Chapter 3, Understanding Lighting Models, gives you an in-depth explanation of how shaders model the behavior of light. The chapter teaches you how to create custom lighting models used to simulate special effects such as toon shading.

Chapter 4, Physically Based Rendering in Unity 5, shows you that physically-based rendering is the standard technology used by Unity 5 to bring realism to your games. This chapter explains how to make the most out of it, mastering transparencies, reflective surfaces, and global illumination.

Chapter 5, Vertex Functions, teaches you how shaders can be used to alter the geometry of an object; this chapter introduces vertex modifiers and uses them to bring volumetric explosions, snow shaders, and other effects to life.

Chapter 6, Fragment Shaders and Grab Passes, explains how to use grab passes to make materials that emulate the deformations generated by these semi-transparent materials.

Chapter 7, Mobile Shader Adjustment, helps you optimize your shaders to get the most out of any devices.

Chapter 8, Screen Effects with Unity Render Textures, shows you how to create special effects and visuals that would otherwise be impossible to achieve.

Chapter 9, Gameplay and Screen Effects, tells you how post-processing effects can be used to complement your gameplay, simulating, for instance, a night vision effect.

Chapter 10, Advanced Shading Techniques, introduces the most advanced techniques in this book, such as fur shading and heatmap rendering.