I was looking around on the internet and saw that people were having a problem creating an accurate hair shader. It is is because hair is complex and has transmittance and reflections which come from two different sides of the hair.
this information comes from Marschner’s specular model.
more info (Physically based) Hair shading - Graphics and GPU Programming - GameDev.net
https://www.cs.cornell.edu/~srm/publications/SG03-hair.pdf
I though that this model could be approximated by changing the reflected light angle for multiple passes. Then I thought that this could be used to fake transmission by reflecting light more than 180 degrees.
What I trying to do is create a shader that can reflect light in directions that violate the reflection law which states that the angle of reflection is the same as the angle of incoming light.
I tried to do this by modifying the Phong model with _reflectAng which is between -0.5 and 0.5
half3 vectorA = (2*normalDirection*(NdotL*_reflectAng))-i.lightDir.xyz;
half3 RefVector = i.lightDir.xyz-vectorA;
float specTmp = max(dot(RefVector, i.cameraView), 0.0);
float specularIntensity = pow(specTmp,_Mattelight);
and I also tried
half3 vectorA = i.lightDir.xyz-(normalDirection*(NdotL*_reflectAng));
half3 RefVector = normalize(vectorA-(normalDirection*NdotL));
float specTmp = max(dot(RefVector, i.cameraView), 0.0);
float specularIntensity = pow(specTmp,_Mattelight);
All any of them do is change specularity size. In the second one specularity looks inverted. Maybe I need to apply normal Phong then move the highlight location later. But I have no idea how to do that.
If reflection direction can be controlled then true refraction, strange mirrors and hair should be possible?