Fade Objects with C# and the Standard URP Shaders | Unity Tutorial

Опубликовано: 19 Июль 2022
на канале: LlamAcademy
17,084
481

Learn how you can easily fade out objects that are using the standard URP shaders that obstruct view to the player using C# code!

In this tutorial you'll see how to determine which material properties to adjust for the standard URP shaders:
⚫ Universal Render Pipeline/Lit
⚫ Universal Render Pipeline/Complex Lit
⚫ Universal Render Pipeline/Simple Lit
⚫ Universal Render Pipeline/Unlit
⚫ Universal Render Pipeline/Baked Lit
as well as learn the process to determine which properties to modify for any other shader when documentation is lacking!

In my tests this performs on average, 0.04ms per frame with the code here, which is, in my opinion, for most cases "good enough" performance to use when you do not know how to make a shader to do this, or just want to keep using the standard URP shaders.

💸 Ongoing sales 💸
⚫ See all active asset sales on the Asset Store: https://assetstore.unity.com/?on_sale...
⚫ Save 25% off your first Asset Store Order: https://prf.hn/click/camref:1101l9QvC...
⚫ Save up to 50% on NEW Assets: https://assetstore.unity.com/?new_sal...

👨‍💻 As always, all code from this video is available on GitHub: https://github.com/llamacademy/urp-fa...

Using the Built-In Render Pipeline? It's a very similar process. Check out this GitHub repository: https://github.com/llamacademy/fade-o... with accompanying video tutorial:   • Fade Objects Using C# & Standard Shad...   for the same effect, but for the Built-In Render Pipeline.

❤ Believe in LlamAcademy's mission and have received value from the videos? Become a Patreon Supporter or YouTube Member:
⚫ Patreon:   / llamacademy  
⚫ YouTube Member:    / @llamacademy   or click the Join button on any video

📱 Let's stay connected
YouTube:    / llamacademy  
Patreon:   / llamacademy  
Facebook:   / llamacademyofficial  
Twitter:   / thellamacademy  
TikTok:   / llamacademy  
Instagram:   / llamacademy  

----
Most tutorials come from knowledge gained making https://survival.llama.software Llama Survival - a top-down zombie survival shooter for Android and iOS.
I also have some Unity Assets (affiliate link): https://assetstore.unity.com/publishe...
Some links may be affiliate links, which at no additional cost to you, gives me a small portion of the purchase.

#unitytutorial #tutorialtuesday #gamedev #tutorial #unity #llamacademy #gamedevelopment

Chapters:
00:00 Topic Introduction
01:45 URP Standard Shader Inspection
03:28 Scene Setup
03:50 FadingObject.cs - Control Which Renderers to Fade
05:49 Variables - FadeObjectsBlockingObject.cs
07:28 Check For Objects Blocking Player - FadeObjectsBlockingObject.cs
11:03 Fade an Object OUT - FadeObjectsBlockingObject.cs
13:53 Fade an Object IN - FadeObjectsBlockingObject.cs
17:41 Set up in Inspector & Demo
18:43 Closing Thoughts


Смотрите видео Fade Objects with C# and the Standard URP Shaders | Unity Tutorial онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь LlamAcademy 19 Июль 2022, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 17,084 раз и оно понравилось 481 людям.