In 4.24 (or 4.23?) we’ve noticed a problem came back with hair: when we look through hair towards the light source hair is overly lit (especially when the light source does not cast shadows). This stands even for hair examples provided by Epic.
In case someone still has problems with this. This works fine on UE 5.4.
Close your unreal engine first, if it is open.
Look for the file in Programs → Epic games → UE (Your UE version) → ( now on the search tab paste this HairBsdf.ush) once your pc finds the file, click on the file and your pc is gonna ask What application you wanna use to open that file, search for Visual Studio.
Now look for this piece of code, (will be found below the big grey text wall):
const float Backlit = min(InBacklit, HairTransmittance.bUseBacklit ? GBuffer.CustomData.z : 1);
Once you have found it, delete that entire line of code or put // in the beggining of the line.
Now paste this in the same line:
const float Backlit = min(InBacklit, GBuffer.CustomData.z);
Save and close, no need for compiling.
Open unreal, let it recompile shaders and now you are able to go to your hair shader and set you backlit node to “0”
Without this piece of code, the backlit doesnt work, hence why it lets all light go through the hair.
Is the shading model of your material set to HAIR? Just making sure…
Also check the link that I mentioned in my response for the quick and forward explanation from the original poster.
I can’t really help much outside of this since I didnt came up with the code, I just did what the original poster said to do, and it worked just fine.
Also its worth to note that I’m using the 5.4.4 version, but I doubt the code has changed compared to the old versions.