keep it up! these are great. I like that you focused on just depth. hoping to see you revisit refraction & reacting to objects in water in separate videos respectively.
This is the first time I subscribe to a channel that fast... The video content is ✨❤️❤️❤️✨ ... Hard to see good content like this in yt anymore, pls keep it up, I want more content like these 😊.
Thank you! Been waiting for this. Your videos have been very informative. After moving from Unity to Godot they gave me a kickstart. Would you mind posting the full code in the description in later videos? So as not to scroll through what was missed. And yes: please make a followup video on all the other details that were not included in this video. This is too interesting
Awesome video keep up the good work. You are very talented to make clear explanation I must say. I would like also your opinion about movement of object on water like boat trail. No good tutorial updated works/ or explain it well like you do
Another great video. Thank you for doing this. I do have a question, how do you handle a player that walks into the water and can see underneath because the water has no depth it looks like normal instead of looking like water… Do you understand?
You would probably need to apply another shader to the viewport when ever the player in under water and switch it off when it's not, the shader would be different than this one
I used your solution which was better than the original one, however it seemed like there was still a bit visible, The method I came up with was to use the depth texture to find the "wavy" part which would be white, all I had to do was to not sample from _suv in those parts, but there would be a thin outline around it which I tried to fix, since there is no way lerp between 0 and 1 in shader I had no idea what was the solution.
@@Code_It_All Do you have code for it. Also doesn't the mix() function act as a lerp? I checked the documentation and it says it acts the same as a lerp with the third value in the function being the weight. The solution I posted has an issue with distortion on the top of the screen, you can fix it by adding 0.010 to the screen_uv.y if you go too far it will start distorting on the bottom or sides. Only issue I found with the solution I posted is the screen uv is brought down the further away it is from the camera(which seems to also cause the distortion on the top problem). This seems realistic but I can't confirm. I don't know how to disable this effect without also removing the water distortion part of it.
My depth code has the "wavy" parts in white and good parts in black, so how would you transition smoothly from 0 to 1 with mix ? The third argument of mix needs to change, where as third argumaent of Lerp can be the same. The code is similar to the one in this video, but depth texture is sampled using the _suv from the prev video, distance is very very low and then put the raw depth_blend ( without any beers law ) in the albedo.
@@Code_It_All I've managed to figure out how to cull the parts above the water using this code if(world.z > VERTEX.z){ ALBEDO = color * normal_screen* normal_depth_blend; }else{
ALBEDO = color * distorted_screen* distorted_depth_blend; } I see what you were talking about when you said there is a weird outline, there is like a thin whispy bit on the edge. I think I fixed it by setting the depth texture and or the screen texture to filter_nearest instead of filter_linear. See if that works.
@@Code_It_All I've managed to figure out it using this code if(world.z >= VERTEX.z){ ALBEDO = color * normalScreen * normalDepthBlend; }else{
ALBEDO = color * distortedScreen* distortedDepthBlend; } I can see what you mean when there is a weird outline. I think I fixed it by setting the filter to filter_nearest to the depth texture, try that. If not, try playing around with the filters in the screen texture and depth to see which works better.
Hey guys, I just made a new Discord server, feel free to join:
discord.gg/AGt8u2RABE
Can you make a totrial in underwater breathing and swimming, and also adding it in random generation world
Great video. I've just recently started learning about shader materials. This series is a great help to understand how they work. :D
keep it up! these are great. I like that you focused on just depth. hoping to see you revisit refraction & reacting to objects in water in separate videos respectively.
This is the first time I subscribe to a channel that fast... The video content is ✨❤️❤️❤️✨ ... Hard to see good content like this in yt anymore, pls keep it up, I want more content like these 😊.
Thanks for the feedback, Glad you liked the videos !
Very valuable content. Well explained and easy to follow for intermediate hobbyist coders like me. Thank you very much! Liked and subscribed.
Extremely Cool and you can teach really nicely! You just gained a new subscriber ❤️. Keep it up 💪🏽
Very nice. Very helpful. Thank you very much for this tutorial..
awesome tutorial, thank you!
well explained. great tutorial. thanks❤
Thank you! Been waiting for this. Your videos have been very informative. After moving from Unity to Godot they gave me a kickstart. Would you mind posting the full code in the description in later videos? So as not to scroll through what was missed. And yes: please make a followup video on all the other details that were not included in this video. This is too interesting
I'm super glad you find my videos helpful, There will be a github repo for projects in the future hopefuly...
I didnt understand anything of the things you said because shaders are magic to me, but i reallllyy liked it
Awesome video keep up the good work. You are very talented to make clear explanation I must say. I would like also your opinion about movement of object on water like boat trail. No good tutorial updated works/ or explain it well like you do
Great but now make it react to objects such as a moving boat.
Working on it !
Can we process Fast Fourier transform on a shader ?
Another great video. Thank you for doing this. I do have a question, how do you handle a player that walks into the water and can see underneath because the water has no depth it looks like normal instead of looking like water… Do you understand?
You would probably need to apply another shader to the viewport when ever the player in under water and switch it off when it's not, the shader would be different than this one
Is it possible to use c# for the shader textures?
how can you see trought the mesh if there is no alpha???
We are not actually seeing through it, it's an illusion using the screen texture which is taken before the mesh itself was rendered
Did you ever figure out how to stop the screen_uv from refracting things not under water? Still haven't figured out a solution.
I used your solution which was better than the original one, however it seemed like there was still a bit visible, The method I came up with was to use the depth texture to find the "wavy" part which would be white, all I had to do was to not sample from _suv in those parts, but there would be a thin outline around it which I tried to fix, since there is no way lerp between 0 and 1 in shader I had no idea what was the solution.
@@Code_It_All Do you have code for it. Also doesn't the mix() function act as a lerp? I checked the documentation and it says it acts the same as a lerp with the third value in the function being the weight. The solution I posted has an issue with distortion on the top of the screen, you can fix it by adding 0.010 to the screen_uv.y if you go too far it will start distorting on the bottom or sides. Only issue I found with the solution I posted is the screen uv is brought down the further away it is from the camera(which seems to also cause the distortion on the top problem). This seems realistic but I can't confirm. I don't know how to disable this effect without also removing the water distortion part of it.
My depth code has the "wavy" parts in white and good parts in black, so how would you transition smoothly from 0 to 1 with mix ? The third argument of mix needs to change, where as third argumaent of Lerp can be the same.
The code is similar to the one in this video, but depth texture is sampled using the _suv from the prev video, distance is very very low and then put the raw depth_blend ( without any beers law ) in the albedo.
@@Code_It_All I've managed to figure out how to cull the parts above the water using this code
if(world.z > VERTEX.z){
ALBEDO = color * normal_screen* normal_depth_blend;
}else{
ALBEDO = color * distorted_screen* distorted_depth_blend;
}
I see what you were talking about when you said there is a weird outline, there is like a thin whispy bit on the edge. I think I fixed it by setting the depth texture and or the screen texture to filter_nearest instead of filter_linear. See if that works.
@@Code_It_All I've managed to figure out it using this code
if(world.z >= VERTEX.z){
ALBEDO = color * normalScreen * normalDepthBlend;
}else{
ALBEDO = color * distortedScreen* distortedDepthBlend;
}
I can see what you mean when there is a weird outline. I think I fixed it by setting the filter to filter_nearest to the depth texture, try that. If not, try playing around with the filters in the screen texture and depth to see which works better.
You should provide a link in the description to the code so we can just copy-paste without watching the video 😛
Can the water surface reflect object above surface if view at low angle?