Here’s a first attempt at delivering an extra shader to the Generic Shader. In this case it is a “lit sphere” shader. ZBrush users should be familiar with the idea, as Pixologic implemented it as “MatCap” shaders. A simple shaded sphere image is used to describe non-local shading over all the surfaces visible to the eye.
In order to add this shader, you just need to copy this shader into the ATGenericShader_f.cg file:
{
float3 origTexCoord = f.TexCoord0;
float2 mapping = materialA.Shade(f).rg; // sampling from rg to go along with typical normal rendering. Could be trivially extended to rgb for a 3D lookup.
f.TexCoord0.x = mapping.r;
f.TexCoord0.y = mapping.g;
float4 ret = materialB.Shade(f);
f.TexCoord0 = origTexCoord;
return ret;
}
Then just restart Fusion. Here I’ve set the shader to slot 20, but you can change that to any number you want. To see the example comp you’ll just have to edit the Shader number slider in the comp. Just to play it really safe, I’ve also copied the shader string into the comments of the GenericShader tool. Neat.
Download Lit Sphere Generic Shader example comp A01


