mirror of
https://github.com/tanema/light_world.lua.git
synced 2024-12-24 20:24:19 +00:00
fixed light range for scaling
This commit is contained in:
parent
c0a80da546
commit
3f62fde726
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user