Search found 3 matches

by lucasm
Sun Jan 22, 2017 1:13 pm
Forum: Support and Development
Topic: Canvas breaking shaders
Replies: 5
Views: 5359

Re: Canvas breaking shaders

Looking at that code you just posted it looks like the shader may still be active by the next render cycle? That's exactly what I intended. The overlay is supposed to be the last drawn layer of my game because it is where messages like "Paused", "Game Over", or "World x-y&q...
by lucasm
Sun Jan 22, 2017 12:18 am
Forum: Support and Development
Topic: Canvas breaking shaders
Replies: 5
Views: 5359

Re: Canvas breaking shaders

The current flow is as follows setCanvas(canvas) self.level:draw() --Those are inside self.level:draw() background:draw() actors:draw() hud:draw() overlay:draw() -- inside overlay:draw()... setShader() -- empty shader print('Game Over') -- in red setShader(shader) -- it gets the r,g,b of every pixel...
by lucasm
Sat Jan 21, 2017 9:43 pm
Forum: Support and Development
Topic: Canvas breaking shaders
Replies: 5
Views: 5359

Canvas breaking shaders

I have a shader that turns the whole screen black-and-white and I use it on my Game Over overlay. My code for this overlay is as follows: local lg = love.graphics lg.setShader() lg.setFont(fontBig) local fontHeight = fontBig:getHeight() lg.printf({{180,0,0},'Game Over'}, 0, (screenHeight/2)-(fontHei...