From de9dffc61e15a6af41947cbcf09ada89779e86ac Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Mon, 1 Apr 2013 20:26:52 +0000 Subject: Cycles: initial subsurface multiple scattering support. It's not working as well as I would like, but it works, just add a subsurface scattering node and you can use it like any other BSDF. It is using fully raytraced sampling compatible with progressive rendering and other more advanced rendering algorithms we might used in the future, and it uses no extra memory so it's suitable for complex scenes. Disadvantage is that it can be quite noisy and slow. Two limitations that will be solved are that it does not work with bump mapping yet, and that the falloff function used is a simple cubic function, it's not using the real BSSRDF falloff function yet. The node has a color input, along with a scattering radius for each RGB color channel along with an overall scale factor for the radii. There is also no GPU support yet, will test if I can get that working later. Node Documentation: http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Nodes/Shaders#BSSRDF Implementation notes: http://wiki.blender.org/index.php/Dev:2.6/Source/Render/Cycles/Subsurface_Scattering --- source/blender/gpu/shaders/gpu_shader_material.glsl | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source/blender/gpu') diff --git a/source/blender/gpu/shaders/gpu_shader_material.glsl b/source/blender/gpu/shaders/gpu_shader_material.glsl index 147d002475b..08747b19df2 100644 --- a/source/blender/gpu/shaders/gpu_shader_material.glsl +++ b/source/blender/gpu/shaders/gpu_shader_material.glsl @@ -2074,6 +2074,11 @@ void node_bsdf_velvet(vec4 color, float sigma, vec3 N, out vec4 result) node_bsdf_diffuse(color, 0.0, N, result); } +void node_subsurface_scattering(vec4 color, float roughness, vec3 N, out vec4 result) +{ + node_bsdf_diffuse(color, 0.0, N, result); +} + /* emission */ void node_emission(vec4 color, float strength, vec3 N, out vec4 result) -- cgit v1.2.3