Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
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 FREE CHAPTER 2. Creating Your First Shader 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

Setting mood with color grading

One of the best ways to easily change the mood of a scene is by changing the colors a scene uses. One of the best examples of this is in the Matrix series of films, where the real world is always blue-tinted, while the computer-generated world of the Matrix is always tinted green. We can emulate this in our games through the use of color grading.

Getting ready

Make sure you have completed the Installing the Post Processing Stack recipe before starting this one.

How to do it...

  1. We first create a new Post Processing Profile by right-clicking within the Assets folder in the Project window and then selecting Create | Post Processing Profile. Once selected, it will allow us to rename the item. Go ahead and set it to ColorProfile.
  2. Select the Post-process volume object and, from the Inspector window, go to the Post Processing Volume component and assign the Profile property to the ColorProflie we just created.
  3. Afterward, select the Game tab, if it hasn't been selected already, to see the results of the changes to be made.
  4. Select the Add effect... button and select Unity | Color Grading.
  5. Check the Mode property and set it to Low Definition Range (LDR). From there, you'll see a number of properties that can be used to adjust the colors on the screen in a similar manner to how Photoshop's hue/saturation menu works. Check the Temperature property and set it to 30. Afterward, set the Hue Shift property to -20 and the Saturation to 15:
  1. After making the changes, dive into the game to see what it looks like when playing:
The final result of using color grading

Notice how the previously very green environment is now much warmer and more yellow than before.

For more information on the color grading effect, check out: https://github.com/Unity-Technologies/PostProcessing/wiki/Color-Grading.
You have been reading a chapter from
Unity 2018 Shaders and Effects Cookbook - Third Edition
Published in: Jun 2018
Publisher:
ISBN-13: 9781788396233
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 $19.99/month. Cancel anytime
Banner background image