You don´t need to apply.The shader is already applied to your Camera.
function main()
{
pp_set(camera,Toon_mat); <-------the shader with Material Toon_Mat is applied to the Camera.



}
And don´t forget to define the Material before Calling it with this:
MATERIAL* Toon_mat =
{
effect = "Toon_.fx";
}

function Toon_set_Value(r,g,b,threshold)
{
Toon_mat.skill1 = floatv(r); //4 looks okay
Toon_mat.skill2 = floatv(g); //same as above
Toon_mat.skill3 = floatv(b); //same as above
Toon_mat.skill4 = floatv(threshold); //0.01
}
Needs to be above main function.

Your Edit:Paste the code in SED save it as Toon_.fx
and include.
Don´t forget what I wrote above about defining the Material.

Bye


Last edited by MoRRoW; 08/19/09 00:00.

If you are unable to learn new stuff,you have to learn to learn new stuff!
A7 7.80 Commercial