mirror of
https://github.com/tanema/light_world.lua.git
synced 2024-12-24 20:24:19 +00:00
fixed the multiple lights issue
This commit is contained in:
parent
117d908ad7
commit
410388d423
@ -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("lightAngle", math.pi - self.angle / 2.0)
|
||||||
self.shadowShader:send("lightDirection", self.direction)
|
self.shadowShader:send("lightDirection", self.direction)
|
||||||
self.shadowShader:send("invert_normal", self.normalInvert == true)
|
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
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user