From 410388d42398edc5bcfd565e16cf939ea6e9959c Mon Sep 17 00:00:00 2001 From: Tim Anema Date: Sat, 29 Nov 2014 19:52:09 -0500 Subject: [PATCH] fixed the multiple lights issue --- lib/light.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/light.lua b/lib/light.lua index bfcd53e..5c7ef1d 100644 --- a/lib/light.lua +++ b/lib/light.lua @@ -130,7 +130,10 @@ function light:drawNormalShading(l,t,w,h,s, normalMap, shadowMap, canvas) self.shadowShader:send("lightAngle", math.pi - self.angle / 2.0) self.shadowShader:send("lightDirection", self.direction) self.shadowShader:send("invert_normal", self.normalInvert == true) - util.drawCanvasToCanvas(normalMap, canvas, {shader = self.shadowShader}) + util.drawCanvasToCanvas(normalMap, canvas, { + blendmode = 'additive', + shader = self.shadowShader + }) end end