Research on Houdini

//Code by Liuyangping
//just has color with shadow pass,No highlight
#pragma hint acceptshadow toggle
#pragma label acceptshadow "AcceptShadow"
//color pannel
#pragma hint basecolor color
#pragma label basecolor "RenderColor"
//get the angel
float angel()
{
    return dot(I,P);
}


surface
vertexFx_particleShader(int acceptshadow=1;vector basecolor={0.6,0.64,0.7})
{
    vector initcolor=(0,0,0);
    vector tempcolor=(0,0,0);
    illuminance(P,N,angel())
    {
            tempcolor=tempcolor+shadow(Cl);
    }
    if (acceptshadow==1)
    {
        Cf=tempcolor*basecolor;
    }
    else
    {
        Cf=basecolor;
    }
}

你可能感兴趣的:(shader,Houdini,Particles)