diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2011-09-16 17:14:02 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2011-09-16 17:14:02 +0400 |
commit | 66b1dfae89cc44953bd51c5da962cab437e76972 (patch) | |
tree | e7679b3e554fb4f1bb6f68775c8619bcde0da822 /intern/cycles/kernel/osl/nodes/node_glossy_bsdf.osl | |
parent | 0a5fcf3da3e82fd114095c8c2903d927f15ffc31 (diff) |
Cycles: tweaks to properties and nodes
* Passes renamed to samples
* Camera lens radius renamed to aperature size/blades/rotation
* Glass and fresnel nodes input is now index of refraction
* Glossy and velvet fresnel socket removed
* Mix/add closure node renamed to mix/add shader node
* Blend weight node added for shader mixing weights
There is some version patching code for reading existing files, but it's not
perfect, so shaders may work a bit different.
Diffstat (limited to 'intern/cycles/kernel/osl/nodes/node_glossy_bsdf.osl')
-rw-r--r-- | intern/cycles/kernel/osl/nodes/node_glossy_bsdf.osl | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/intern/cycles/kernel/osl/nodes/node_glossy_bsdf.osl b/intern/cycles/kernel/osl/nodes/node_glossy_bsdf.osl index ca6bee74b38..aa446b66cfb 100644 --- a/intern/cycles/kernel/osl/nodes/node_glossy_bsdf.osl +++ b/intern/cycles/kernel/osl/nodes/node_glossy_bsdf.osl @@ -23,23 +23,15 @@ shader node_glossy_bsdf( color Color = color(0.8, 0.8, 0.8), string distribution = "Beckmann", float Roughness = 0.2, - float Fresnel = 1.0, normal Normal = N, output closure color BSDF = diffuse(Normal)) { - float Fr = 1.0; - - if(Fresnel < 1.0) { - float eta = 1.0/clamp(1.0 - Fresnel, 1e-5, 1.0 - 1e-5); - Fr = fresnel_dielectric(I, Normal, eta); - } - if(distribution == "Sharp") - BSDF = (Fr*Color)*reflection(Normal); + BSDF = Color*reflection(Normal); else if(distribution == "Beckmann") - BSDF = (Fr*Color)*microfacet_beckmann(Normal, Roughness); + BSDF = Color*microfacet_beckmann(Normal, Roughness); else if(distribution == "GGX") - BSDF = (Fr*Color)*microfacet_ggx(Normal, Roughness); + BSDF = Color*microfacet_ggx(Normal, Roughness); } |