Cycles: glossy and anisotropic BSDF changes
[blender.git] / intern / cycles / kernel / shaders / node_anisotropic_bsdf.osl
index 3ecf5b46befd08e30723f788fbd14b1f8b8e0a8e..da1e4f77107c5eb3608123982779d1f63b496ad1 100644 (file)
@@ -18,7 +18,7 @@
 
 shader node_anisotropic_bsdf(
        color Color = 0.0,
-       string distribution = "Ward",
+       string distribution = "GGX",
        float Roughness = 0.0,
        float Anisotropy = 0.0,
        float Rotation = 0.0,
@@ -45,9 +45,13 @@ shader node_anisotropic_bsdf(
                RoughnessV = Roughness / (1.0 - aniso);
        }
 
-       if (distribution == "Ashikhmin-Shirley")
-               BSDF = Color * ashikhmin_shirley(Normal, T, RoughnessU, RoughnessV);
+       if (distribution == "Sharp")
+               BSDF = Color * reflection(Normal);
+       else if (distribution == "Beckmann")
+               BSDF = Color * microfacet_beckmann_aniso(Normal, T, RoughnessU, RoughnessV);
+       else if (distribution == "GGX")
+               BSDF = Color * microfacet_ggx_aniso(Normal, T, RoughnessU, RoughnessV);
        else
-               BSDF = Color * ward(Normal, T, RoughnessU, RoughnessV);
+               BSDF = Color * ashikhmin_shirley(Normal, T, RoughnessU, RoughnessV);
 }