diff options
Diffstat (limited to 'intern/cycles/kernel/shaders')
-rw-r--r-- | intern/cycles/kernel/shaders/node_subsurface_scattering.osl | 10 | ||||
-rw-r--r-- | intern/cycles/kernel/shaders/stdosl.h | 3 |
2 files changed, 9 insertions, 4 deletions
diff --git a/intern/cycles/kernel/shaders/node_subsurface_scattering.osl b/intern/cycles/kernel/shaders/node_subsurface_scattering.osl index 5c25c44ec8f..eb21a5f69bd 100644 --- a/intern/cycles/kernel/shaders/node_subsurface_scattering.osl +++ b/intern/cycles/kernel/shaders/node_subsurface_scattering.osl @@ -22,12 +22,14 @@ shader node_subsurface_scattering( color Color = 0.8, float Scale = 1.0, vector Radius = vector(0.1, 0.1, 0.1), - float IOR = 1.3, + float TextureBlur = 0.0, // XXX use + string Falloff = "Cubic", normal Normal = N, output closure color BSSRDF = 0) { - float eta = max(IOR, 1.0 + 1e-5); - - BSSRDF = Color * bssrdf_cubic(N, Scale * Radius); + if(Falloff == "Cubic") + BSSRDF = Color * bssrdf_cubic(N, Scale * Radius); + else if(Falloff == "Gaussian") + BSSRDF = Color * bssrdf_gaussian(N, Scale * Radius); } diff --git a/intern/cycles/kernel/shaders/stdosl.h b/intern/cycles/kernel/shaders/stdosl.h index 24c3e187783..7d1c2443ee7 100644 --- a/intern/cycles/kernel/shaders/stdosl.h +++ b/intern/cycles/kernel/shaders/stdosl.h @@ -463,7 +463,10 @@ closure color emission() BUILTIN; closure color background() BUILTIN; closure color holdout() BUILTIN; closure color ambient_occlusion() BUILTIN; + +// BSSRDF closure color bssrdf_cubic(normal N, vector radius) BUILTIN; +closure color bssrdf_gaussian(normal N, vector radius) BUILTIN; // Backwards compatibility |