We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Something about the new version seems to have reduced performance. I was getting 60fps with my fastgaussianblur shader, and now I'm getting ~35fps.
I think there is more buffer switching going on than used to happen, but I'm not sure that could explain it. Maybe it's applying the shader twice?
After inlining the shader code for the blur filter I got back up to 60fps, i.e. I did something like:
local ps = love.graphics.getShader() local pc = love.graphics.setCanvas() local pbm = love.graphics.getBlendMode() love.graphics.setCanvas(c1) love.graphics.clear() _drawGameInternal(players, map, draw_map_end, shaders.cfg_all) love.graphics.setShader(shader) love.graphics.setBlendMode("alpha", "premultiplied") shader:send('direction', {1 / love.graphics.getWidth(), 0}) love.graphics.setCanvas(c2) love.graphics.clear() love.graphics.draw(c1, 0, 0) shader:send('direction', {0, 1 / love.graphics.getHeight()}) love.graphics.setCanvas(pc) love.graphics.draw(c2, 0, 0) love.graphics.setBlendMode(pbm) love.graphics.setShader(ps)
The text was updated successfully, but these errors were encountered:
Strange. The draw of a chain with a fast gaussian blur should expand to this:
draw
local canvas = love.graphics.getCanvas() local shader = love.graphics.getShader() local color = {love.graphics.getColor()} love.graphics.setCanvas(front, back) -- a bug, at the moment love.graphics.clear() _drawGameInternal(...) local blendmode = love.graphics.getBlendMode() love.graphics.setColor(color) love.graphics.setBlendMode("alpha", "premultiplied") -- first pass shader:send('direction', {1 / love.graphics.getWidth(), 0}) front, back = back, front love.graphics.setCanvas(front) love.graphics.clear() if shader ~= love.graphics.getShader() then love.graphics.setShader(shader) end love.graphics.draw(back) -- second pass shader:send('direction', {0, 1 / love.graphics.getHeight()}) front, back = back, front love.graphics.setCanvas(front) love.graphics.clear() if shader ~= love.graphics.getShader() then love.graphics.setShader(shader) end love.graphics.draw(back) love.graphics.setShader() love.graphics.setCanvas(canvas) love.graphics.draw(front,0,0) love.graphics.setBlendMode(blendmode) love.graphics.setShader(shader)
So there is one more buffer switch than in your version. Unfortunately, the switch is needed to make chaining work.
Sorry, something went wrong.
Initially use only front buffer as canvas (issue #32)
549f177
No branches or pull requests
Something about the new version seems to have reduced performance. I was getting 60fps with my fastgaussianblur shader, and now I'm getting ~35fps.
I think there is more buffer switching going on than used to happen, but I'm not sure that could explain it. Maybe it's applying the shader twice?
After inlining the shader code for the blur filter I got back up to 60fps, i.e. I did something like:
The text was updated successfully, but these errors were encountered: