Cycles: replace surface/volume sockets in output nodes with a single shader socket,

decided it's better to render objects as either surface or volume.

This may break the volume rendering patch, but shaders with volume closures still
get tagged as having volume closures, so it should be fixable without too many
changes.
This commit is contained in:
Brecht Van Lommel
2011-10-12 15:42:35 +00:00
parent 85818c8209
commit 7503a7edfb
20 changed files with 1496 additions and 1601 deletions

View File

@@ -218,8 +218,8 @@ void OSLShader::eval_surface(KernelGlobals *kg, ShaderData *sd, float randb, int
/* execute shader for this point */
int shader = sd->shader & SHADER_MASK;
if(kg->osl.surface_state[shader])
ctx->execute(OSL::pvt::ShadUseSurface, *(kg->osl.surface_state[shader]), *globals);
if(kg->osl.state[shader])
ctx->execute(OSL::pvt::ShadUseSurface, *(kg->osl.state[shader]), *globals);
/* flatten closure tree */
sd->num_closure = 0;
@@ -355,8 +355,8 @@ void OSLShader::eval_volume(KernelGlobals *kg, ShaderData *sd, float randb, int
/* execute shader */
int shader = sd->shader & SHADER_MASK;
if(kg->osl.volume_state[shader])
ctx->execute(OSL::pvt::ShadUseSurface, *(kg->osl.volume_state[shader]), *globals);
if(kg->osl.state[shader])
ctx->execute(OSL::pvt::ShadUseSurface, *(kg->osl.state[shader]), *globals);
/* retrieve resulting closures */
sd->osl_closure.volume_sample_sum = 0.0f;