Not logged inOpenClonk Forum
Up Topic Landscape zooming

This board is threaded (i.e. has a tree structure). Please use the Reply button of the specific post you are referring to, not just any random button. If you want to reply to the topic in general, use the Post button near the top and bottom of the page.

Post Reply
In Response to PeterW
The vectors are 2D. So basically when the light vector is (1.0, 1.0) and the "normal" is (1.0, 1.0), we'd have a solid 2.0 multiplicator, whereas (1.0, 1.0) vs. (-1.0, -1.0) would give you 0.0, corresponding to total darkness.

Besides, immediately after making that post I realized how silly it was not to use the dot product from the start. It's faster on top of having nicer mathematical properties. For the screenshot in my follow-up post, the formula is actually 1.0 + dot(normal, light) already.

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill