SabreCSG icon indicating copy to clipboard operation
SabreCSG copied to clipboard

Screen effect to remove flickering pixel artefacts. Please test this everyone!

Open Henry00IS opened this issue 6 years ago • 5 comments

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:

image

You will immediately feel better:

image


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.

Henry00IS avatar Apr 15 '18 21:04 Henry00IS

This will help a lot of people who have the performance to spare but I worry this is not a long term solution.

sabresaurus avatar Apr 15 '18 23:04 sabresaurus

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.

Henry00IS avatar Apr 16 '18 17:04 Henry00IS

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.

Henry00IS avatar Apr 16 '18 17:04 Henry00IS

Added MSAA support to the shader, some configurable parameters as well as a debug mode.

image

It's nice making screenshots without artefacts!

Henry00IS avatar Apr 16 '18 19:04 Henry00IS

I have tested this and it seems to work rather well.

nukeandbeans avatar Jun 06 '18 08:06 nukeandbeans