Archived

This topic is now archived and is closed to further replies.

shalrath

lighting help

Recommended Posts

shalrath    128
I''ve been reading this tutorial: http://www.flipcode.com/tutorials/tut_swlighting.shtml and I''ve made my way right to the bottom to discover a vector operation called "Clamp" and I have no idea what this means... Could anyone explain it for me please?

Share this post


Link to post
Share on other sites
JTippetts    12970
Clamping a value means to restrict it to a certain range (usually the range [0,1]). For a single value, it is roughly equal to

if(value < Low) value=Low;
if(value > High) value=High;


Clamping a vector means merely clamping each of the individual elements to the range.

Josh
vertexnormal AT linuxmail DOT org


Check out Golem: Lands of Shadow, an isometrically rendered hack-and-slash inspired equally by Nethack and Diablo.


[edited by - VertexNormal on January 15, 2004 9:16:07 PM]

Share this post


Link to post
Share on other sites