Lightning is not additive anymore

Now otclient lightning may look like more tibia lights,
before this too many lights together would increase
brightness a lot, this won't happen anymore in cards
with OpenGL 1.4 or newer
This commit is contained in:
Eduardo Bart
2013-02-06 19:49:40 -02:00
parent 86c462eb4d
commit 7f6a4bbbe5
5 changed files with 53 additions and 1 deletions

View File

@@ -126,6 +126,7 @@ void LightView::draw(const Rect& dest, const Rect& src)
m_lightbuffer->bind();
g_painter->setCompositionMode(Painter::CompositionMode_Replace);
drawGlobalLight(m_globalLight);
g_painter->setBlendEquation(Painter::BlendEquation_Max);
g_painter->setCompositionMode(Painter::CompositionMode_Add);
for(const LightSource& source : m_lightMap)
drawLightSource(source.center, source.color, source.radius);