In short, materials use shader codes with the effect command. FX files are apparently plain text format (unformatted text). I don't know how shaders work or how they are written (they're not in the manual).

Code:

material quicktest
{
ambient_red = 255; // full brightness
ambient_green = 255;
ambient_blue = 255;
effect = "
technique technique_name
{
pass p0
{
// insert shader code here
}

// pass p1 // for additional passes
}

// technique simpler // additional techniques for lower end cards
" // end effect string
}

action my_action
{
my.material = quicktest; // assigns the material for the shader
}



This is as far as I can go. The manual only gives the information I've given. It doesn't explain how to do any calculations, or what the other options are available. I wished it did though.

This thread, however, should be moved to the shaders forum....


"You level up the fastest and easiest if you do things at your own level and no higher or lower" - useful tip My 2D game - release on Jun 13th; My tutorials