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:
Code: Select all
canvas:drawTo(function()
--draw stuff
end)
Draw the pp canvas with shaders
Code: Select all
canvas:draw(shader1, shader2, ...)
You can also draw it without shaders.
The shaders will be applied in the order of the arguments.
- pp_demo.gif (20.11 MiB) Viewed 10921 times
Photo in the demo by Greg Galas from Pexels
The thing is on
github as wel.l