     return min(1.0, min(masking, shadowing));
 }
 
-float fresnel(vec3 normal, vec3 light, float indexR)
+float bias(float t, float a)
+{
+    return pow(t, ((-log(a))/log(2)));
+}
+
+
+float fresnel(vec3 normal, vec3 light, float bias, float eta, float Kfr)
+{
+    float ndotv, kr;
+
+    ndotv = abs(dot(normal, light));
+    kr = eta + (1.0 - eta)*pow(1.0-ndotv,5.0);
+    kr = Kfr*bias(kr, bias);
+
+    return kr;
+}
+
+float fresnel_hack(vec3 normal, vec3 light, float indexR)
 {
    float R0 = pow((1.0 - indexR), 2.0);
 

    H = normalize(Ln + V);
    D = distro(Nf, H, m);
    G = geom(Nf, H, Ln, V);

    cook  = D*G;
    vdotn = dot(V, Nf);

varying float cMatShin;
varying vec3 camDirection;
varying vec3 N, Nn;
varying vec4 L;

float seelinger()
{
   float tmp, rV;
   vec3 Ln, V;
