SabreCSG
SabreCSG copied to clipboard
Screen effect to remove flickering pixel artefacts. Please test this everyone!
Post process screen effect to remove flickering pixel artefacts. An alternative solution to actually going in and fixing the mesh (it takes ages for the algorithm to complete at the moment).
Add the script to your camera object:
You will immediately feel better:
On your Camera object you MUST DISABLE MSAA for this shader to work:
If you do need MSAA use an Antialiasing screen effect below this script.
You can download this SabreCSG version here. Please test it and let me know if it all works as it should.
This will help a lot of people who have the performance to spare but I worry this is not a long term solution.
I have significantly improved the artefact detection. It will no longer blur edges and it works way better with transparent textures.
@sabresaurus While it's true that this is going to inevitably take some performance I have been unable to determine any slowdown using Unity's statistics. To the point where I believe it's just too lightweight to make any difference on my system. I will need some feedback from someone with a laptop or alike.
I mean unless you mean having an image effect to do MSAA, because yes that's a real problem and performance hog... I am going to have a look at a solution for it.
Added MSAA support to the shader, some configurable parameters as well as a debug mode.
It's nice making screenshots without artefacts!
I have tested this and it seems to work rather well.