Ratchet wrote:Can someone make a shader that makes a monitor bulge effect like this? Mari0 has a shader like this but I don't know how to use it in 0.9.0.
I don't even need to post a .love to demonstrate this.
Take a shader from the Mari0 .love, such as CRT.frag, and store it with main.lua.
function love.load()
canvas = love.graphics.newCanvas()
local str = love.filesystem.read('CRT.frag')
shader = love.graphics.newShader(str)
shader:send('inputSize', {love.graphics.getWidth(), love.graphics.getHeight()})
shader:send('textureSize', {love.graphics.getWidth(), love.graphics.getHeight()})
end
function love.draw()
love.graphics.setCanvas(canvas)
--draw stuff here
love.graphics.setCanvas()
love.graphics.setShader(shader)
love.graphics.draw(canvas)
love.graphics.setShader()
end
Much much better, thank you
I played with all these values, of cause this one I forgot... (And I'm too stupid to understand these complex math thingys)
beforan wrote:this is pretty simple stuff, and sorry if it's duplicated but I couldn't find one from cursory searching:
a colour cycling shader!
Thanks for posting that shader! I'm learning how to use them too, and so I decided to try and base something off of yours, just without the brightness problems associated with making RGB values follow a sine wave pattern
Just made a smoke shader. Was really interested about trying shaders that "propagate". By that I mean, shaders that have an initial state and build off it. Had to use two canvases to maintain the previous state and feed it back to the shader.
It's actually based off this paper. The algorithm itself can be summarized in one line (with the rest setting everything up), that being the one that sets the current pixel's alpha value, to the neighboring pixel's values with a certain factor.
Really pretty, OmarShehata! I was playing around with it just now, if you 'paint' at the very bottom of the window the effect freezes. I didn't look at the source but I assume it's because the pixels at the bottom never change their alpha values (since there's nothing to sample below them).
Do you recognise when the world won't stop for you? Or when the days don't care what you've got to do? When the weight's too tough to lift up, what do you? Don't let them choose for you, that's on you.