Original Post
i am just trying to convert a cg shader to glsl and cg uses a function called mad....glsl don't have this and i assume it means multiply and add is this correct than? [Edited by - subi on May 11, 2006 3:35:15 AM]
float mad(float a,float b,float c)
{
return a + (b*c);
}
//or this:
float mad(float a,float b,float c)
{
return (a*b)+c;
}
//or perhpas something else??