Cycles Volume Render: work on nodes and closures.

* Henyey-Greenstein scattering closure implementation.
* Rename transparent to absorption node and isotropic to scatter node.
* Volume density is folded into the closure weights.
* OSL support for volume closures and nodes.
* This commit has no user visible changes, there is no volume render code yet.

This is work by "storm", Stuart Broadfoot, Thomas Dinges and myself.
This commit is contained in:
2013-12-28 01:54:44 +01:00
parent a06c9c277a
commit a35db17cee
28 changed files with 344 additions and 129 deletions

View File

@@ -868,17 +868,19 @@ ccl_device float3 shader_volume_eval_phase(KernelGlobals *kg, ShaderData *sd,
{
#ifdef __MULTI_CLOSURE__
float3 eval = make_float3(0.0f, 0.0f, 0.0f);
float pdf;
for(int i = 0; i< sd->num_closure; i++) {
const ShaderClosure *sc = &sd->closure[i];
if(CLOSURE_IS_VOLUME(sc->type))
eval += volume_eval_phase(kg, sc, omega_in, omega_out);
eval += volume_eval_phase(sc, omega_in, omega_out, &pdf);
}
return eval;
#else
return volume_eval_phase(kg, &sd->closure, omega_in, omega_out);
float pdf;
return volume_eval_phase(&sd->closure, omega_in, omega_out, &pdf);
#endif
}