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>2012-03-28 14:39:21 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2012-03-28 14:39:21 +0400
commit755f0183240527e9b274ce4f80f1cf1d7e414164 (patch)
treedb8472ce0ba4b4372ad1d3b907edf58c0b674164 /intern/cycles/render/film.cpp
parent1e5424564c0c01d0772641f3896ffaa1a2616e2b (diff)
Cycles: shadow pass support. Note that this only takes into account lamps,
emitting objects or world lighting do not contribute to the shadow pass. Consider this more as a pass useful for some compositing tricks, unlike other lighting passes this pass can't be used to exactly reconstruct the combined pass.
Diffstat (limited to 'intern/cycles/render/film.cpp')
-rw-r--r--intern/cycles/render/film.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/intern/cycles/render/film.cpp b/intern/cycles/render/film.cpp
index 3fb1e385adc..5fd98e20240 100644
--- a/intern/cycles/render/film.cpp
+++ b/intern/cycles/render/film.cpp
@@ -116,6 +116,10 @@ void Pass::add(PassType type, vector<Pass>& passes)
pass.components = 4;
pass.exposure = true;
break;
+ case PASS_SHADOW:
+ pass.components = 4;
+ pass.exposure = false;
+ break;
}
passes.push_back(pass);
@@ -232,6 +236,9 @@ void Film::device_update(Device *device, DeviceScene *dscene)
case PASS_AO:
kfilm->pass_ao = kfilm->pass_stride;
kfilm->use_light_pass = 1;
+ case PASS_SHADOW:
+ kfilm->pass_shadow = kfilm->pass_stride;
+ kfilm->use_light_pass = 1;
case PASS_NONE:
break;
}