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@gmail.com>2018-02-08 18:19:04 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2018-02-09 21:58:42 +0300
commita6968e87f1338081f30725f8f2ca3460e280fea2 (patch)
tree0fdc61c15c86953fb431894871e7cf0a75dc5031 /intern/cycles/kernel/osl
parent0df9b2c71517a98760a5e577f434d9d86e4e1910 (diff)
Cycles: add random walk subsurface scattering to Principled BSDF.
Differential Revision: https://developer.blender.org/D3054
Diffstat (limited to 'intern/cycles/kernel/osl')
-rw-r--r--intern/cycles/kernel/osl/osl_bssrdf.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/intern/cycles/kernel/osl/osl_bssrdf.cpp b/intern/cycles/kernel/osl/osl_bssrdf.cpp
index 907afe7d17a..da7368bbc61 100644
--- a/intern/cycles/kernel/osl/osl_bssrdf.cpp
+++ b/intern/cycles/kernel/osl/osl_bssrdf.cpp
@@ -53,6 +53,7 @@ static ustring u_gaussian("gaussian");
static ustring u_burley("burley");
static ustring u_principled("principled");
static ustring u_random_walk("random_walk");
+static ustring u_principled_random_walk("principled_random_walk");
class CBSSRDFClosure : public CClosurePrimitive {
public:
@@ -83,6 +84,9 @@ public:
else if (method == u_random_walk) {
alloc(sd, path_flag, weight, CLOSURE_BSSRDF_RANDOM_WALK_ID);
}
+ else if (method == u_principled_random_walk) {
+ alloc(sd, path_flag, weight, CLOSURE_BSSRDF_PRINCIPLED_RANDOM_WALK_ID);
+ }
}
void alloc(ShaderData *sd, int path_flag, float3 weight, ClosureType type)