Not logged inOpenClonk Forum
Up Topic Colored lights

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

> Instead of decreasing the brightness with distance I fade the color to white (if shadow is true) in DrawVertex()


This will desaturate the shadow the darker it gets. Not sure.

> Anyway, I with the current implementation I have no idea how to merge light colors yet.


Well, don't overwrite it, but do an alpha blit. That way the first light has a fighting chance.

Hm, as far as I'm concerned, light intensity should decide how bright a light is, so the color from the color texture should get "normalised" (yay for information loss). Assuming we fade towards black this has the good property that the first alpha blit would effectively "set" the fully saturated color, no matter the alpha value. So we could make the alpha depend on brightness, which would help with mixing. We need to be careful about divisions by zero though. Will probably all be a bit fiddly...

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill