Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
Unity 6 Shaders and Effects Cookbook

You're reading from   Unity 6 Shaders and Effects Cookbook Over 50 recipes for creating captivating visual effects in Unity and enhancing your game's visual impact

Arrow left icon
Product type Paperback
Published in Jul 2025
Publisher Packt
ISBN-13 9781835468579
Length 532 pages
Edition 5th Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
John P. Doran John P. Doran
Author Profile Icon John P. Doran
John P. Doran
Arrow right icon
View More author details
Toc

Table of Contents (20) Chapters Close

Preface
1. Part I: Foundations of Shading and Rendering in Unity
2. Using Post-Processing with URP FREE CHAPTER 3. Creating Your First Shader with Shader Graph 4. Working with Surfaces 5. Working with Texture Mapping 6. Enhancing Realism: Unity Muse and Physically Based Rendering 7. Part II: Advanced Shader Effects and Geometry Manipulation
8. Using Vertex Functions 9. Using Grab Passes 10. Part III: Performance Optimization and Fullscreen Effects
11. Optimizing Shaders 12. Creating Screen Effects with Fullscreen Shaders 13. Gameplay and Screen Effects 14. Part IV: Section Custom Lighting and Advanced Shader Programming
15. Understanding Lighting Models 16. Developing Advanced Shading Techniques 17. Utilizing the HDRP 18. Other Books You May Enjoy
19. Index

Using properties in a Surface Shader

Now that we have created some properties in Shader Graph, let’s hook them up to the shader so that we can tweak the value and make the material process much more interactive. Shader properties allow users to tweak shader values directly from the material’s Inspector window, providing a flexible and user-friendly way to adjust shader parameters without modifying the shader code itself.

Getting ready

For this recipe, we will refit the shader we created previously. Instead of using a texture to create the visuals, the shader will only use a color and some other properties that we will be able to change directly from the Inspector window:

  1. Start by duplicating StandardDiffuseShader. You can do this by selecting it from the Inspector window and pressing Ctrl + D. This will create a copy called StandardDiffuseShader 1. Go ahead and rename it ParameterExample.
  2. Next, create a new material (ParameterExampleMaterial...
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 $19.99/month. Cancel anytime