fixed light range for scaling

This commit is contained in:
Tim Anema 2014-12-02 21:45:19 -05:00
parent c0a80da546
commit 3f62fde726

View File

@ -122,7 +122,7 @@ function light:drawNormalShading(l,t,w,h,s, normalMap, shadowMap, canvas)
self.shadowShader:send('shadowMap', shadowMap) self.shadowShader:send('shadowMap', shadowMap)
self.shadowShader:send('lightColor', {self.red / 255.0, self.green / 255.0, self.blue / 255.0}) self.shadowShader:send('lightColor', {self.red / 255.0, self.green / 255.0, self.blue / 255.0})
self.shadowShader:send("lightPosition", {(self.x + l/s) * s, (h/s - (self.y + t/s)) * s, (self.z * 10) / 255.0}) self.shadowShader:send("lightPosition", {(self.x + l/s) * s, (h/s - (self.y + t/s)) * s, (self.z * 10) / 255.0})
self.shadowShader:send('lightRange',{self.range}) self.shadowShader:send('lightRange',{self.range * s})
self.shadowShader:send("lightSmooth", self.smooth) self.shadowShader:send("lightSmooth", self.smooth)
self.shadowShader:send("lightGlow", {1.0 - self.glowSize, self.glowStrength}) self.shadowShader:send("lightGlow", {1.0 - self.glowSize, self.glowStrength})
self.shadowShader:send("lightAngle", math.pi - self.angle / 2.0) self.shadowShader:send("lightAngle", math.pi - self.angle / 2.0)