From bc6216b5b0ca45020308baaf3e07544ece7499b8 Mon Sep 17 00:00:00 2001 From: gustavo kishima Date: Wed, 23 Nov 2016 00:01:11 -0200 Subject: [PATCH] [24] main.lua file which run all examples is not working Due to some code change, method drawShadows() at file init.lua fails on line 160:self.shadowShader:send('lightRange',{light.range * s}). This happens because self.shadowShader:send() should receive a number instead of a table. Changing the line to 160:self.shadowShader:send('lightRange',light.range * s) solved the issue. --- lib/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/init.lua b/lib/init.lua index 130f1a1..19c862a 100644 --- a/lib/init.lua +++ b/lib/init.lua @@ -157,7 +157,7 @@ function light_world:drawShadows(l,t,w,h,s) -- draw scene for this light using normals and shadowmap self.shadowShader:send('lightColor', {light.red / 255.0, light.green / 255.0, light.blue / 255.0}) self.shadowShader:send("lightPosition", {(light.x + l/s) * s, (light.y + t/s) * s, (light.z * 10) / 255.0}) - self.shadowShader:send('lightRange',{light.range * s}) + self.shadowShader:send('lightRange',light.range * s) self.shadowShader:send("lightSmooth", light.smooth) self.shadowShader:send("lightGlow", {1.0 - light.glowSize, light.glowStrength}) util.drawCanvasToCanvas(self.shadowMap, self.shadow_buffer, {