Fixed a number of OSL syntax errors from the updated 1.2 API. Microfacet functions now all take an eta parameter, set to 1.0 if no IOR is given.

This commit is contained in:
Lukas Toenne 2012-09-02 15:41:35 +00:00
parent 28d02bc056
commit e1bca6cfc4
3 changed files with 5 additions and 5 deletions

@ -34,8 +34,8 @@ shader node_glass_bsdf(
if(distribution == "Sharp")
BSDF = Color*(Fr*reflection(Normal) + (1.0-Fr)*refraction(Normal, eta));
else if(distribution == "Beckmann")
BSDF = Color*(Fr*microfacet_beckmann(Normal, Roughness) + (1.0-Fr)*microfacet_beckmann_refraction(Normal, Roughness, eta));
BSDF = Color*(Fr*microfacet_beckmann(Normal, Roughness, eta) + (1.0-Fr)*microfacet_beckmann_refraction(Normal, Roughness, eta));
else if(distribution == "GGX")
BSDF = Color*(Fr*microfacet_ggx(Normal, Roughness) + (1.0-Fr)*microfacet_ggx_refraction(Normal, Roughness, eta));
BSDF = Color*(Fr*microfacet_ggx(Normal, Roughness, eta) + (1.0-Fr)*microfacet_ggx_refraction(Normal, Roughness, eta));
}

@ -29,9 +29,9 @@ shader node_glossy_bsdf(
if(distribution == "Sharp")
BSDF = Color*reflection(Normal);
else if(distribution == "Beckmann")
BSDF = Color*microfacet_beckmann(Normal, Roughness);
BSDF = Color*microfacet_beckmann(Normal, Roughness, 1.0);
else if(distribution == "GGX")
BSDF = Color*microfacet_ggx(Normal, Roughness);
BSDF = Color*microfacet_ggx(Normal, Roughness, 1.0);
}

@ -27,6 +27,6 @@ shader node_velvet_bsdf(
{
float sigma = clamp(Sigma, 0.0, 1.0);
BSDF = Color*ashikhmin_velvet(Normal, sigma);
BSDF = Color*ashikhmin_velvet(Normal, sigma, 1.0);
}