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 now! 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
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Hands-On Unity 2020 Game Development

You're reading from   Hands-On Unity 2020 Game Development Build, customize, and optimize professional games using Unity 2020 and C#

Arrow left icon
Product type Paperback
Published in Jul 2020
Publisher Packt
ISBN-13 9781838642006
Length 580 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Nicolas Alejandro Borromeo Nicolas Alejandro Borromeo
Author Profile Icon Nicolas Alejandro Borromeo
Nicolas Alejandro Borromeo
Arrow right icon
View More author details
Toc

Table of Contents (24) Chapters Close

Preface 1. Chapter 1: Designing a Game from Scratch 2. Chapter 2: Setting Up Unity FREE CHAPTER 3. Chapter 3: Working with Scenes and GameObjects 4. Chapter 4: Grayboxing with Terrain and ProBuilder 5. Chapter 5: Importing and Integrating Assets 6. Chapter 6: Materials and Effects with URP and Shader Graph 7. Chapter 7: Visual Effects with Particle Systems and VFX Graph 8. Chapter 8: Lighting Using the Universal Render Pipeline 9. Chapter 9: Fullscreen Effects with postprocessing 10. Chapter 10: Sound and Music Integration 11. Chapter 11: User Interface Design 12. Chapter 12: Creating Animations with Animator, Cinemachine, and Timeline 13. Chapter 13: Introduction to Unity Scripting with C# 14. Chapter 14: Implementing Movement and Spawning 15. Chapter 15: Physics Collisions and Health System 16. Chapter 16: Win and Lose Conditions 17. Chapter 17: Scripting the UI, Sounds, and Graphics 18. Chapter 18: Implementing Game AI for Building Enemies 19. Chapter 19: Scene Performance Optimization 20. Chapter 20: Building the Project 21. Chapter 21: Finishing Touches 22. Chapter 22: Augmented Reality in Unity 23. Other Books You May Enjoy

Applying transparency

Before declaring our effect finished, a little addition we can do is to make the water a little bit transparent. Remember that the Shader Pipeline has this Blending stage, which has the responsibility of blending each pixel of our model into the image being rendered in this frame. The idea is to make our Shader Graph modify that stage to apply an Alpha Blending, a blending that combines our model and the previous rendered models based on the Alpha value of our model. To get that effect, do the following steps:

  1. Click the wheel at the top-right part of the Master node.
  2. Set Surface property to Transparent.
  3. Set the Blend property to Alpha if it isn't already at that value:

    Figure 6.48 PBR Master node settings

  4. Set the Alpha input pin of the Master to 0.5:

    Figure 6.49 Setting the Alpha of the Master node

  5. Save the graph and see the transparency being applied in the Scene View. If you can't see the effect, just put a cube in the water to...
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