pp.lua - Easily apply multiple post processing shaders!
Posted: Tue Sep 28, 2021 11:42 pm
Over the years i've frequently found myself wanting to apply multiple post processing shaders to my game. I would usually just hack something together with a bunch of canvases. Today i found myself in that very situation, So i decided to write a little helper module as a favor to my future self.
Usage:
Load it:
Create a new pp canvas
Draw something to it:
Draw the pp canvas with shaders
You can also draw it without shaders.
The shaders will be applied in the order of the arguments.
Photo in the demo by Greg Galas from Pexels
The thing is on github as wel.l
Usage:
Load it:
Code: Select all
pp = require("pp")
Code: Select all
canvas = pp.new(width, height)
Code: Select all
canvas:drawTo(function()
--draw stuff
end)
Code: Select all
canvas:draw(shader1, shader2, ...)
Code: Select all
canvas:draw()
The thing is on github as wel.l