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 Marky
Coming back from the grave :D

Well, did some additional work, because I wanted ambient light with color for a long time, too. Currently this is implemented as an uniform "ambientColor" that is forwarded to the shader, then in the shader I do some non-correct light mixing on the fragments, and you can see the result here:



For some reason the ambientColor uniform is available for "dynamic light" only :/. Here are some mockups setting the color in the shader directly, so that the landscape gets the correct color, too:

Normal light RGB(255, 255, 255)

"Sundown" RGB(255, 128, 150)

"Night" RGB(20, 20, 100)

No light RGB(0, 0, 0)


FInally, the issues that I have with it, will not merge this soon:
- the GUI is affected, too => preferrably it should not
- it overrides the actual Clonk light (which just reveals FoW, but it is already white and that is changed to the ambient color). Ideally, I'd like to use the ambient light color when the light texture is generated in the engine, but could not find where the color value is set in the "draw light pixel" or what it is called.
- the landscape does not get the ambient color, so it draws at the darkest possible color, as mentioned above
- there are weird artifacts if everything is set to the darkest color

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill