Time and Animation in Shaders! URP Shader Graph and HLSL! ✔️ 2021.1 | Unity Game Dev Tutorial

preview_player
Показать описание
✔️ Tested in 2020.3 ➕ 2020.1

Getting the current time in shaders is easier that it seems at first! Unity provides a shader graph node and many HLSL variables for your every need, but what exactly do they contain? When does the time counter begin? Is it affected by time scaling? I look into the URP source to find out. Time allows you to animate in shaders, which is super powerful! I showcase two animating shaders: one which loops, and one which starts at a specified time.

👋 Subscribe for weekly game development videos!
► ✨ Watch the full tutorial on Wednesday! ✨

👑 Join my Patreon to watch videos early, download all project files, vote on future topics, and more! Thank you so much!

🔗 Check out my website for a searchable list of tutorials!

💬 Video transcript

⏲️ Timestamps:
0:00 Intro
0:30 Finding the source
2:03 A looping animation
2:40 A start time animation
3:16 Pausing
3:32 Wrap up and credits

🎖️ Credits, references and further reading:
• Unity Technologies: URP source and documentation

Music:
Bleeping Demo by Kevin MacLeod

#GameDev #IndieDev #Unity
Рекомендации по теме
Комментарии
Автор

Hi everyone! I'd like to do more videos about animation in shaders, do you have any requests?

NedMakesGames
Автор

i really have to try those simple animations with shaders, i'm a sucker for getting the best possible performance. thank you.

paulorodriguez
Автор

Hello Ned.Is there any tutorial you 've made about the material transition in 3:12.Thank you.

nullptr
Автор

You're using a Custom Function for the rotating and floating Star called "AngleAxis3x3". May it be possible to provide me that function?

ChrisX
Автор

Fun fact. Before around version 2019.4 the _Time variable was unscaled. Now, as Ned clearly shows, the time is scaled

geri
Автор

Ned, thanks a lot for the video. Could you tell me which extension you are using in VS for syntax highlighting?

_RayDay_
Автор

If you wanted to pause game time but have shaders continue animating, how would you go about doing this?

nikefootbag
Автор

Its more like Tweening in shaders, not animating.

arsenbabaev
welcome to shbcf.ru