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.
This commit is contained in:
Brecht Van Lommel
2012-03-28 10:39:21 +00:00
parent 1e5424564c
commit 755f018324
9 changed files with 61 additions and 21 deletions

View File

@@ -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;
}