Hello community, as we all know, Godot doesn't have an anisotropy model to simulate the appearance of hair, so I want to share a hair shader that I adapted from this website https://zhuanlan.zhihu.com/p/363829203 based on the Kajiya-Kay approximation model. I also had to make some modifications to make it look a little better. I am not an expert in shaders, so there may be some errors in the shader. That's why I'm asking someone with more experience in this to review the shader and make it better than what I did. Nonetheless, I think it's a good start and the shader is quite functional. I also leave you a repository where they implement the Marschner model in Unity, which is more accurate than the Kajiya-Kay model, and although I tried to adapt it to Godot, I didn't have success.
Note: (I had posted this on the Godot subreddit but I think it was deleted for spam since I just joined the subreddit yesterday).

Here is the shader

Video Demo

I skimmed through the shader. It looks correct. Nice job.

4 days later

Godot doesn't have an anisotropy model to simulate the appearance of hair

Godot 4 has a rewritten BaseMaterial3D with anisotropy support that matches Filament's.