Unity Shaders and Effects Cookbook


Unity Shaders and Effects Cookbook
eBook: $29.99
Formats: PDF, PacktLib, ePub and Mobi formats
$25.49
save 15%!
Print + free eBook + free PacktLib access to the book: $79.98    Print cover: $49.99
$49.99
save 37%!
Free Shipping!
UK, US, Europe and selected countries in Asia.
Also available on:
Overview
Table of Contents
Author
Support
Sample Chapters
  • Learn the secrets of creating AAA quality Shaders without having to write long algorithms
  • Add realism to your game with stunning Screen Effects
  • Understand the structure of Surface Shaders through easy to understand step-by-step examples

Book Details

Language : English
Paperback : 268 pages [ 235mm x 191mm ]
Release Date : June 2013
ISBN : 1849695083
ISBN 13 : 9781849695084
Author(s) : Kenny Lammers
Topics and Technologies : All Books, Game Development, Unity, Cookbooks, Games

Table of Contents

Preface
Chapter 1: Diffuse Shading
Chapter 2: Using Textures for Effects
Chapter 3: Making Your Game Shine with Specular
Chapter 4: Reflecting Your World
Chapter 5: Lighting Models
Chapter 6: Transparency
Chapter 7: Vertex Magic
Chapter 8: Mobile Shader Adjustment
Chapter 9: Making Your Shader World Modular with CgIncludes
Chapter 10: Screen Effects with Unity Render Textures
Chapter 11: Gameplay and Screen Effects
Index
  • Chapter 1: Diffuse Shading
    • Introduction
    • Creating a basic Surface Shader
    • Adding properties to a Surface Shader
    • Using properties in a Surface Shader
    • Creating a custom diffuse lighting model
    • Creating a Half Lambert lighting model
    • Creating a ramp texture to control diffuse shading
    • Creating a faked BRDF using a 2D ramp texture
    • Chapter 2: Using Textures for Effects
      • Introduction
      • Scrolling textures by modifying UV values
      • Animating sprite sheets
      • Packing and blending textures
      • Normal mapping
      • Creating procedural textures in the Unity editor
      • Photoshop levels effect
      • Chapter 3: Making Your Game Shine with Specular
        • Introduction
        • Utilizing Unity3D's built-in Specular type
        • Creating a Phong Specular type
        • Creating a BlinnPhong Specular type
        • Masking Specular with textures
        • Metallic versus soft Specular
        • Creating an Anisotropic Specular type
        • Chapter 4: Reflecting Your World
          • Creating Cubemaps in Unity3D
          • Simple Cubemap reflection in Unity3D
          • Masking reflections in Unity3D
          • Normal maps and reflections in Unity3D
          • Fresnel reflections in Unity3D
          • Creating a simple dynamic Cubemap system
          • Chapter 5: Lighting Models
            • Introduction
            • The Lit Sphere lighting model
            • The diffuse convolution lighting model
            • Creating a vehicle paint lighting model
            • Skin shader
            • Cloth shading
            • Chapter 6: Transparency
              • Introduction
              • Creating transparency with alpha
              • Transparent cutoff shader
              • Depth sorting with render queues
              • GUI and transparency
              • Chapter 7: Vertex Magic
                • Introduction
                • Accessing a vertex color in a Surface Shader
                • Animating vertices in a Surface Shader
                • Using vertex color for terrains

                        Kenny Lammers

                        Kenny Lammers has been working in the games industry for 13 years now. He has worked for companies such as Microsoft, Activision, and the late Surreal Software. He currently runs two companies; the first is Creative TD, where he does Unity3D consulting / asset creation for companies such as IGT, Microsoft, Janus Research, and Allegorithmic, and the second company he owns and operates, with his business partner Noah Kaarbo, is Ozone Interactive. Ozone specializes in creating interactive applications and high-quality design with a focus on Untiy3D, for companies such as Amazon, E-line Media, Microsoft, and Sucker Punch games. His games industry experience has given him the opportunity to create characters using Zbrush and Maya, to write real-time Shaders and post effects, and to program full games in Unity3D using C#. He is currently working on a few games and developing toolsets within Unity to expedite the game creation process.

                        Sorry, we don't have any reviews for this title yet.

                        Code Downloads

                        Download the code and support files for this book.


                        Submit Errata

                        Please let us know if you have found any errors not listed on this list by completing our errata submission form. Our editors will check them and add them to this list. Thank you.


                        Errata

                        - 3 submitted: last submission 02 Apr 2014

                        Errata Type: Code Page No: 12

                        The code:
                        _AmbientColor ("Ambient Color", Range(0,10)) = 2
                        should be
                        _AmbientColor ("Ambient Color", Color) = (1,1,1,1)

                        Errata Type: Code Page No: 23

                        The code:
                        float difLight = dot(0, dot(s.Normal, lightDir));
                        should be
                        float difLight = max(0, dot (s.Normal, lightDir));

                        Errata Type: Typo Page No: 62

                        The line:

                        In this recipe, we will be covering how to implement the per vertex version of the and also see
                        how to implement the per pixel version using some new parameters in the surface Shader's
                        Input struct.

                        Should be:

                        In this recipe, we will be covering how to implement the per vertex version of the Phong Specular type and also see how to implement the per pixel version using some new parameters in the surface Shader's Input struct.

                        Sample chapters

                        You can view our sample chapters and prefaces of this title on PacktLib or download sample chapters in PDF format.

                        Frequently bought together

                        Unity Shaders and Effects Cookbook +    IBM DB2 9.7 Advanced Application Developer Cookbook =
                        50% Off
                        the second eBook
                        Price for both: €37.50

                        Buy both these recommended eBooks together and get 50% off the cheapest eBook.

                        What you will learn from this book

                        • Use textures to create complex lighting without the need for complex and performance-heavy lighting rigs
                        • Master the art of using math to construct shiny objects as well as soft objects
                        • See what it takes to create more complex surfaces like skin and cloth
                        • Take a look at why a Shader is expensive and what works well for mobile platforms as opposed to PC platforms
                        • Enter the world of creating post effects and make your game look visually stunning
                        • Understand what goes into the structure of Shaders and why lighting works the way it does
                        • Build your Shader knowledge by understanding how Diffuse and Specular work and understand how to use them in creative ways

                        In Detail

                        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. 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.

                        Starting with essential lighting and finishing up by creating stunning Screen Effects alike those in high quality 3D and mobile games. Discover techniques including Normal mapping, Image based lighting, and how to animate your models inside of a Shader. Explore the secrets behind some of the most powerful Shaders including skin and hair! With "Unity Shaders and Effects Cookbook" what seems like a dark art today will be second nature by tomorrow.

                        Approach

                        Unity Effects and Shader Cookbook is written in a Cookbook style, teaching you to create stunning Shaders and effects through step-by-step, illustrated examples.

                        Who this book is for

                        Unity Effects and Shader Cookbook is written for developers wanting to create your first Shaders in Unity3D, or who wish to take their game to a whole new level with effects. No previous Shader writing experience is necessary to use this book, though a solid understanding of Unity is required.

                        Code Download and Errata
                        Packt Anytime, Anywhere
                        Register Books
                        Print Upgrades
                        eBook Downloads
                        Video Support
                        Contact Us
                        Awards Voting Nominations Previous Winners
                        Judges Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software
                        Resources
                        Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software