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.
//}



