diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2013-08-18 18:15:57 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2013-08-18 18:15:57 +0400 |
commit | d43682d51bbe70448b328980d29c3a08cf4d4a26 (patch) | |
tree | f4e265a9280e67756d8cb284a392dc1ed084b96f /intern/cycles/kernel/osl/osl_closures.h | |
parent | a2541508ac9918ce614b87a88f25993788b3ce3b (diff) |
Cycles: Subsurface Scattering
New features:
* Bump mapping now works with SSS
* Texture Blur factor for SSS, see the documentation for details:
http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Nodes/Shaders#Subsurface_Scattering
Work in progress for feedback:
Initial implementation of the "BSSRDF Importance Sampling" paper, which uses
a different importance sampling method. It gives better quality results in
many ways, with the availability of both Cubic and Gaussian falloff functions,
but also tends to be more noisy when using the progressive integrator and does
not give great results with some geometry. It works quite well for the
non-progressive integrator and is often less noisy there.
This code may still change a lot, so unless you're testing it may be best to
stick to the Compatible falloff function.
Skin test render and file that takes advantage of the gaussian falloff:
http://www.pasteall.org/pic/show.php?id=57661
http://www.pasteall.org/pic/show.php?id=57662
http://www.pasteall.org/blend/23501
Diffstat (limited to 'intern/cycles/kernel/osl/osl_closures.h')
-rw-r--r-- | intern/cycles/kernel/osl/osl_closures.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/intern/cycles/kernel/osl/osl_closures.h b/intern/cycles/kernel/osl/osl_closures.h index ca5f441aa2d..e3a7e890597 100644 --- a/intern/cycles/kernel/osl/osl_closures.h +++ b/intern/cycles/kernel/osl/osl_closures.h @@ -50,7 +50,8 @@ OSL::ClosureParam *closure_bsdf_diffuse_ramp_params(); OSL::ClosureParam *closure_bsdf_phong_ramp_params(); OSL::ClosureParam *closure_westin_backscatter_params(); OSL::ClosureParam *closure_westin_sheen_params(); -OSL::ClosureParam *closure_bssrdf_params(); +OSL::ClosureParam *closure_bssrdf_cubic_params(); +OSL::ClosureParam *closure_bssrdf_gaussian_params(); void closure_emission_prepare(OSL::RendererServices *, int id, void *data); void closure_background_prepare(OSL::RendererServices *, int id, void *data); @@ -60,7 +61,8 @@ void closure_bsdf_diffuse_ramp_prepare(OSL::RendererServices *, int id, void *da void closure_bsdf_phong_ramp_prepare(OSL::RendererServices *, int id, void *data); void closure_westin_backscatter_prepare(OSL::RendererServices *, int id, void *data); void closure_westin_sheen_prepare(OSL::RendererServices *, int id, void *data); -void closure_bssrdf_prepare(OSL::RendererServices *, int id, void *data); +void closure_bssrdf_cubic_prepare(OSL::RendererServices *, int id, void *data); +void closure_bssrdf_gaussian_prepare(OSL::RendererServices *, int id, void *data); enum { AmbientOcclusion = 100 @@ -89,7 +91,8 @@ public: ShaderClosure sc; CBSDFClosure(int scattering) : OSL::ClosurePrimitive(BSDF), - m_scattering_label(scattering), m_shaderdata_flag(0) { } + m_scattering_label(scattering), m_shaderdata_flag(0) + { memset(&sc, 0, sizeof(sc)); } ~CBSDFClosure() { } int scattering() const { return m_scattering_label; } |