Post

On that note, let's also *dive* in another favorite subject of mine: 💧 Water shaders 💧 Here's another behind-the-scenes 🧵 on the tech-art behind our water visuals in HERDLING:

Okomotive@okomotive.ch

A view so nice it's worth getting wet feet for

28 reposts138 likes

Maybe we water shader people should compile a definite water shader guidexD The water shader on my recent project uses most of those techniques as well and I think everybody who got your points implemented is in a pretty good spot with their water shading magic!✨ (+ those fluid dynamics look tasty!)

I think at this point all water shaders feature more or less the same stuff, there's no reason to re-invent the wheel for a lot of them :P but it's always nice to add a small twist here and there ✨

In its core, the water shader is pretty standard, but it has some tricks up its sleeves 👀 It mainly features: - A custom lighting model - Depth-difference based intersection effects - Fake refraction with a twist* - World-space projected caustics - Color absorption - a surprise** (1/16)

The custom lighting is something I usually like to do with water shaders: I like nice normals panning up and down affecting reflections and refraction, but I don't like it when they are used in the diffuse color; it makes the water look plastic and points to the lack of subsurface scattering (2/16)

So, I just use the mesh normals for diffuse and the tangent-space normals for specular reflections, refraction, reflections etc. That way I get nice glints of specular without any dark spots from the diffuse The distorted specular, reflections etc are enough to convey the water surface ✨ (3/16)

For intersections, I'm just using the classic depth-difference approach, comparing the mesh distance from the camera and the camera depth texture I use that to break apart a noise texture, along with some sine waves for visual variety. (4/16)