Y2k/6th Gen Water
Water shader inspired by video games from the early-to-mid 2000s, such as the water in Morrowind or Super Mario Sunshine
Parems:
Normal Map: The normal map for the waves (I used a noise texture in godot and checked “Normal Map” and “Seamless” on)
Color: what color the water is
Rapid: How fast the waves move
Tranparency: How see-through the water is. Adjust this to your liking and to fit the style of your game
Shader code
shader_type spatial;
uniform sampler2D normal_map;
uniform vec4 color: source_color = vec4(1, 1, 1, 1);
uniform float rapid = .05;
uniform float transparency: hint_range(0.0, 1.0, 0.01) = 1.0;
void vertex() {
// Called for every vertex the material is visible on.
}
void fragment() {
vec2 uv = vec2(UV.x + TIME * rapid, UV.y);
ALBEDO = vec3(color.r, color.g, color.b);
vec4 bump = texture(normal_map, uv);
NORMAL_MAP = vec3(bump.r, bump.g, bump.b);
METALLIC = 1.0;
ROUGHNESS = 0.;
ALPHA = transparency;
}
//void light() {
// // Called for every pixel for every light affecting the material.
// // Uncomment to replace the default light processing function with this one.
//}




renders as black for me 🙁 also do you want any credits? Im using a few of your shaders in my game (Theyre good!)
appears like that at first for me too, gotta add a noise texture to the “normal map” parameter, give it noise, make it a normal and then give it seamlessness. Works pretty well after that. Unfortunately it stretches improperly when the mesh is large so it’s not very useful to me.
I believe with the noise, you can change the size and that will help. Although for very, very large bodies of water it may not be ideal. Good for lakes or water in smaller levels