Gain and Bias work just like the contrast and brightness on a television. Gain controls the
"contrast" of the combiner and Bias the "brightness".
Each shader works by varying a value between 0.0 and 1.0. This means that if you added say
TS_Bozo and set the first color to black and the second to white with Blend1 at 0.0 and
Blend2 at 1.0 you would get a blend, black to white.
As previously stated the Bias allows you to control the brightness. So using the above example a
Bias of 0.5 sets the shader to go black to white. If the Bias is lowered then them shader
gets darker and will become more black. Conversely, if the Bias is raised the shader gets
lighter and tends towards being white.
As far as the Gain is concerned this controls the point at which the shader starts to darken,
in other words the width of the light to dark transition. At a value of 0.5 the shader will
start black and vary continually until it becomes white. As the gain is lowered
this transition spreads so that over the combiner's range it will only go from dark grey to
light gray. If the Gain is raised the transition get smaller so that the fade black to white
happens quicker until at the very highest values it is a discrete step.
By varying the Gain and Bias a full range of effects can be created provided an infinite range
of shaders. The table below shows just some of the effects of the Gain and Bias when using
the TS_Bozo shader.
|