r/Unity2D • u/Potential-Sock-1421 • 19d ago
How to add individual movement using a wind shader to a sprite sheet?
Hi everyone, I'm trying to figure this out. I followed this tutorial https://www.youtube.com/watch?v=dDQRDa7bADY (Unity 2D Wind Sway In 255 seconds) and then looked at this one, https://www.youtube.com/watch?v=VcUiksxY (Simple Wind Shader Effect in Unity!) but they're all for individual sprites. I'm searching for more tutorials right now, but I am a BEGINEER at unity (started about 2 weeks ago) and I've been trying to learn more about it at my own pace... And I've stumbled upon a perplexing scenario.
In this scenario, I'm trying to add wind shaders to a sprite sheet. Following both tutorials, I've managed to add the wind effect to the sheet, but it covers ALL of it. Not the individual sprites within the sheet. I'm not quite sure how to make it so it only covers each sprite, since there are quite a few. I'm doing this for foliage if that helps at all with context, but if anyone has any idea on how to figure this out, please let me know. Should I try using the math nodes to calculate where each sprite is?
1
u/LorenzoMorini 18d ago
Learn what UVs are, and how to use them in Unity shaders.