Here the vdrift.brdf (specular only) to be used with Disney BRDF Explorer (
http://www.disneyanimation.com/technology/brdf.html ):
Code:
analytic
::begin parameters
float roughness 0.001 1 .1
float metallic 0.001 1 .1
color color 1 1 1
::end parameters
::begin shader
const float pi = 3.14159265358979323846;
vec3 Fresnel(vec3 f0, float cos_theta)
{
float b = 1 - cos_theta;
float b2 = b * b;
return f0 + (1 - f0) * b2 * b2 * b;
}
vec3 VDriftBRDF(vec3 f0, float r, float nv, float nl, float nh, float vh)
{
float a = r * r;
float a2 = a * a;
float d = nh * nh * (a2 - 1) + 1;
float r1 = r + 1;
float k = r1 * r1 / 8;
vec3 f = Fresnel(f0, vh);
return f * a2 / (4 * pi * d * d * (nl * (1 - k) + k) * (nv * (1 - k) + k));
}
vec3 BRDF( vec3 L, vec3 V, vec3 N, vec3 X, vec3 Y )
{
vec3 f0 = mix(vec3(0.04), color, metallic);
vec3 H = normalize(V + L);
float nv = max(0.0, dot(N, V));
float nl = max(0.0, dot(N, L));
float nh = max(0.0, dot(N, H));
float vh = max(0.0, dot(V, H));
return VDriftBRDF(f0, roughness, nv, nl, nh, vh) ;
}
::end shader
Try to match some of the brdf samples from here
http://people.csail.mit.edu/wojciech/BRD...ase/brdfs/