PDA

View Full Version : LRP -- What is the Blending Factor operand?



pha3z
08-27-2005, 11:42 AM
I read that LRP takes three operands. Two operands are the values to interpolate between. The remaining operand is a "blending factor". Its been years since I've looked at a math book. I can't even think of what that other operand might do. Is it some sort of bias value to shift the result toward one or the other of the two values being interpolated between?

Hlz
08-27-2005, 04:46 PM
http://oss.sgi.com/projects/ogl-sample/registry/ARB/fragment_program.txt

It's simple linear interpolation between 2 vectors.
LRP c, t, a, b; c = t*a + (1-t)*b, t is in [0,1] for lerp.

pha3z
08-27-2005, 06:34 PM
aha! thanks :)