An fx-file can be the "effect" for a material.
A material can be assigned to an entity:
(toon.fx is a fx-file countaining a toon shader)
(c-script, lite-c is similar but with pointers (MATERIAL*, ...))
BMAP bmap_toonlook = <toonlook.bmp>;
MATERIAL mtl_toon = {
skin1 = bmap_toonlook;
effect = "toon.fx";
}
//action: fx_toon
//title: Cartoon shading
//
//desc:
//desc: Shades the object in two steps and paints a black line around it
//
function fx_toon() {
my.material = mtl_toon;
}