[Bf-cycles] Factor input for Add shader
Gottfried Hofmann
gottfried at blenderdiplom.com
Fri Oct 26 22:00:50 CEST 2012
Hey there,
one thing I was hoping for since the dawn of Cycles is a factor input
for the Add-Shader (just like the mix shader has). I think that's way
more intuitive than making the shader you want to add darker/brighter if
you want to change the strength of the effect.
Here is a simple OSL script that creates such an Add-Shader:
#include "stdosl.h"
shader node_advancedadd_closure(
float Fac = 1.0,
closure color Closure1 = 0,
closure color Closure2 = 0,
output closure color Closure = 0)
{
float t = clamp(Fac, 0.0, 1.0);
Closure = Closure1 + t * Closure2;
}
To avoid breaking things the factor could be set to 1 by default so the
Node would normally work just like the current Add-Shader.
Cheers,
Gottfried
More information about the Bf-cycles
mailing list