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-04-02 00:26:52 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2013-04-02 00:26:52 +0400
commitde9dffc61e15a6af41947cbcf09ada89779e86ac (patch)
treec3f6e42482085a3a18c8278adf55dbb1e0f76c8d /intern/cycles/render/tables.cpp
parent40b05d364e988bca01dd338026dc24765f56187a (diff)
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
Diffstat (limited to 'intern/cycles/render/tables.cpp')
-rw-r--r--intern/cycles/render/tables.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/intern/cycles/render/tables.cpp b/intern/cycles/render/tables.cpp
index fecdd52c60c..c7c86f68960 100644
--- a/intern/cycles/render/tables.cpp
+++ b/intern/cycles/render/tables.cpp
@@ -24,6 +24,8 @@
CCL_NAMESPACE_BEGIN
+/* Lookup Tables */
+
LookupTables::LookupTables()
{
need_update = true;
@@ -39,7 +41,7 @@ void LookupTables::device_update(Device *device, DeviceScene *dscene)
if(!need_update)
return;
- device->tex_alloc("__lookup_table", dscene->lookup_table, true); // XXX interpolation
+ device->tex_alloc("__lookup_table", dscene->lookup_table);
need_update = false;
}
@@ -73,6 +75,8 @@ size_t LookupTables::add_table(DeviceScene *dscene, vector<float>& data)
lookup_tables.insert(table, new_table);
break;
}
+ else
+ new_table.offset = table->offset + table->size;
}
if(table == lookup_tables.end()) {