mirror of
https://github.com/tanema/light_world.lua.git
synced 2024-12-24 20:24:19 +00:00
fixed translation problem after postshader changes
This commit is contained in:
parent
702de1389a
commit
cde3349852
@ -249,7 +249,7 @@ function light_world:draw(l,t,w,h,s)
|
||||
|
||||
love.graphics.push()
|
||||
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:drawShadow( 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)
|
||||
love.graphics.pop()
|
||||
|
||||
self.post_shader:drawWith(self.render_buffer)
|
||||
self.post_shader:drawWith(self.render_buffer, l, t)
|
||||
end
|
||||
|
||||
-- draw shadow
|
||||
|
@ -64,7 +64,7 @@ function post_shader:toggleEffect(shaderName, ...)
|
||||
end
|
||||
end
|
||||
|
||||
function post_shader:drawWith(canvas)
|
||||
function post_shader:drawWith(canvas, l, t)
|
||||
for shader, args in pairs(self.effects) do
|
||||
if shader == "bloom" then
|
||||
self:drawBloom(canvas, args)
|
||||
@ -88,7 +88,7 @@ function post_shader:drawWith(canvas)
|
||||
love.graphics.setCanvas()
|
||||
love.graphics.setShader()
|
||||
love.graphics.setColor(255, 255, 255)
|
||||
love.graphics.draw(canvas)
|
||||
love.graphics.draw(canvas, l or 0, t or 0)
|
||||
end
|
||||
|
||||
function post_shader:drawBloom(canvas, args)
|
||||
|
Loading…
Reference in New Issue
Block a user