fixed translation problem after postshader changes

This commit is contained in:
Tim Anema 2014-10-07 09:49:56 -04:00
parent 702de1389a
commit cde3349852
2 changed files with 4 additions and 4 deletions

View File

@ -249,7 +249,7 @@ function light_world:draw(l,t,w,h,s)
love.graphics.push() love.graphics.push()
love.graphics.scale(1/s) love.graphics.scale(1/s)
sl, st, sw, sh = (l*s), (t*s), (w*s), (h*s) local sl, st, sw, sh = (l*s), (t*s), (w*s), (h*s)
self.drawBackground( sl,st,sw,sh,s) self.drawBackground( sl,st,sw,sh,s)
self:drawShadow( sl,st,sw,sh,s) self:drawShadow( sl,st,sw,sh,s)
self.drawForground( sl,st,sw,sh,s) self.drawForground( sl,st,sw,sh,s)
@ -260,7 +260,7 @@ function light_world:draw(l,t,w,h,s)
self:drawReflection( sl,st,sw,sh,s) self:drawReflection( sl,st,sw,sh,s)
love.graphics.pop() love.graphics.pop()
self.post_shader:drawWith(self.render_buffer) self.post_shader:drawWith(self.render_buffer, l, t)
end end
-- draw shadow -- draw shadow

View File

@ -64,7 +64,7 @@ function post_shader:toggleEffect(shaderName, ...)
end end
end end
function post_shader:drawWith(canvas) function post_shader:drawWith(canvas, l, t)
for shader, args in pairs(self.effects) do for shader, args in pairs(self.effects) do
if shader == "bloom" then if shader == "bloom" then
self:drawBloom(canvas, args) self:drawBloom(canvas, args)
@ -88,7 +88,7 @@ function post_shader:drawWith(canvas)
love.graphics.setCanvas() love.graphics.setCanvas()
love.graphics.setShader() love.graphics.setShader()
love.graphics.setColor(255, 255, 255) love.graphics.setColor(255, 255, 255)
love.graphics.draw(canvas) love.graphics.draw(canvas, l or 0, t or 0)
end end
function post_shader:drawBloom(canvas, args) function post_shader:drawBloom(canvas, args)