made the range adhere to the scale as well

This commit is contained in:
Tim Anema 2014-10-24 13:34:44 -04:00
parent 5474b11c50
commit c9fac640d7

View File

@ -146,7 +146,7 @@ function light:drawShadow(l,t,w,h,s,bodies, canvas)
self.shadow:clear() self.shadow:clear()
util.drawto(self.shadow, l, t, s, function() util.drawto(self.shadow, l, t, s, function()
self.shader:send("lightPosition", {self.x*s, (h/s - self.y)*s, self.z}) self.shader:send("lightPosition", {self.x*s, (h/s - self.y)*s, self.z})
self.shader:send("lightRange", self.range) self.shader:send("lightRange", self.range*s)
self.shader:send("lightColor", {self.red / 255.0, self.green / 255.0, self.blue / 255.0}) self.shader:send("lightColor", {self.red / 255.0, self.green / 255.0, self.blue / 255.0})
self.shader:send("lightSmooth", self.smooth) self.shader:send("lightSmooth", self.smooth)
self.shader:send("lightGlow", {1.0 - self.glowSize, self.glowStrength}) self.shader:send("lightGlow", {1.0 - self.glowSize, self.glowStrength})