Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2013-08-18 18:15:57 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2013-08-18 18:15:57 +0400
commitd43682d51bbe70448b328980d29c3a08cf4d4a26 (patch)
treef4e265a9280e67756d8cb284a392dc1ed084b96f /intern/cycles/render/shader.cpp
parenta2541508ac9918ce614b87a88f25993788b3ce3b (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/render/shader.cpp')
-rw-r--r--intern/cycles/render/shader.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/intern/cycles/render/shader.cpp b/intern/cycles/render/shader.cpp
index 5b326e0a017..75b3b193e76 100644
--- a/intern/cycles/render/shader.cpp
+++ b/intern/cycles/render/shader.cpp
@@ -55,6 +55,7 @@ Shader::Shader()
has_converter_blackbody = false;
has_volume = false;
has_displacement = false;
+ has_bssrdf_bump = false;
used = false;
@@ -236,11 +237,19 @@ void ShaderManager::device_update_common(Device *device, DeviceScene *dscene, Sc
flag |= SD_HOMOGENEOUS_VOLUME;
if(shader->has_surface_bssrdf)
has_surface_bssrdf = true;
+ if(shader->has_bssrdf_bump)
+ flag |= SD_HAS_BSSRDF_BUMP;
if(shader->has_converter_blackbody)
has_converter_blackbody = true;
+ /* regular shader */
shader_flag[i++] = flag;
shader_flag[i++] = shader->pass_id;
+
+ /* shader with bump mapping */
+ if(shader->graph_bump)
+ flag |= SD_HAS_BSSRDF_BUMP;
+
shader_flag[i++] = flag;
shader_flag[i++] = shader->pass_id;
}