• Advertisement

Archived

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

lighting help

This topic is 5119 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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
Advertisement
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

  • Advertisement