This is a fantastic shader. I can see all kinds of uses for this. It's amazing to me how so much complexity can come out of fairly simple shader math. The combinations of interesting things you can do is effectively infinite. The only thing that bugs me is that I get a weird border artifact. I tried removing mipmaps as suggested by the user below, but that doesn't work. Gonna see if I can add a fudge factor that just drops the UV if it's close to a border. Edit : Removing mipmap does work, but I think godot might have been doing some weird caching. I changed the image to something else, changed it back, and now it's artifact free. Very odd but I will take the win.
The Master of Shaders has spoken, I'd say. 😘👍 Following along with shader tutorials isn't too much of a problem, but honestly coming up with such stuff myself is just something which I am lacking something for. …I don't even know where these kinda pain points come from. I mean, I am a professional programmer for 20 years, I am developing things like web applications and server scripts for a living, but thinking in shader is a whole lot different to my day job apparently. Can be frustrating somehow. That's why for now I am only tinkering a bit with Visual Shaders in Godot, that's also a lot of fun and takes away some pain points that I still have with Shader script. However. I love to follow these kinds of videos, no matter I would have been able to do that on my own or not. Maybe I will some day. (Or maybe not, I wouldn't be too mad at me actually. The most important thing is to have fun with playing around with such stuff.) Thank you for your awesome tutorials and your great looking games! Keep up!
Thanks for the nice comment! Yes, working with shaders is a bit different than other code. Maybe I can try to come up with a video that tries to help with that "Shader Mindset". I suggest to think in layers when working on a shader. Try to break down an effect into all the small parts that it needs and work on each individually, then bring everything together.
Shaders are more art than science - your brushes are geometry haha. No hard and fast rules I think , but programmers are basically trained to think in fundementals , but there is a certain fuzziness that needs to be applied to understand how to do shaders well. I'm only just learning myself - but I'm hooked. And videos like this only help. It never even occured to me to use like a radial texture. I saw a video on PlayWithFuficer that talked about using curves textures to control various things. So at some level you can do alot with shaders by some geometry/trig and using layered textures the way you would in photoshop.
Turn off mipmap on the texture to get rid of the weird line. I made that same polar coordinates system in my game recently. 😉 throw a sin(radius) function in there to get a swirl effect. I already know you have ideas where to use it😁
As always, very clear and helpful. After your tuts, the UX designer in my face makes shaders for programmers, because they can not. What have you done! Cheers from Ukraine)
New viewer here! Caught wind of you from a godot game jam video. Any tips or suggested resources for finding your way around shaders? Loving the content btw!
This looks great! :) Always wanted to get into shaders and I think I'll start here. Quick question though: How would you go about gathering textures for your shaders? Is there some sort of popular "starter pack" with a variety of textures or do you just gatrher them from various sites?
It kinda sucks that in Godot 4 (beta6) I get different results. For example scroll_speed is not working :( It is animating for 0.5 sec when I start scene but not in an editor itself.
It is kinda weird but I reacreated it in 3.5.1 and it still is not animating in realtime. Maybe I've done something wrong. Will check. Edit: I think I've done everything identical and still no animation and only half of the shader is showing -> i.imgur.com/LJClm3E.png Edit2: Fck me I am stupid. I've read comments and thing that you explain at 14:30 is basically answer to my problem... It works great now (in 3.5.1). Sorry about that.
10:06 I followed the code 1:1 but the repeat and scale variable doesnt seem to work for. If it's bigger than 1 the texture gets smaller but doesnt repeat. I made it work by using a mod of 1 but I wonder what caused it.