rj200 / Glamarye_Fast_Effects_for_ReShade

Designed for speed, this shader for ReShade is for people who can't just run everything at max settings but want good enough post-processing without costing much framerate. It combines 4 effects in one - Fast FXAA, sharpening, depth of field and fast ambient occlusion
MIT License
115 stars 12 forks source link

[BUG] - Black outlines near objects #12

Closed sanek7814 closed 1 year ago

sanek7814 commented 1 year ago

In the game Quantum Break, I noticed such a sharpness bug that black outlines appear on some objects, especially on some white text for example, on the monitors that are in the game. I bring two photos for demonstration.

https://i.ibb.co/p477qSZ/1.png - your shader with a sharpness strength of 2 https://i.ibb.co/nms5Nr0/1.png - CAS shader with a value of 8

In the screenshots, this can be seen with a detailed approximation (blue circle) but in the game it can be seen very noticeably. It catches the eye.

pepper-jelly commented 1 year ago

@sanek7814 it's simple unsharp mask, just lower strength or use another sharpener with lower radius(luma sharpen, cas)

sanek7814 commented 1 year ago

I'd love to, but I'm used to your shader, time after time it shows great results against cas or luma.

rj200 commented 1 year ago

Well at high strength any sharpen algorithm will create some halos or outlines - that's basically how sharpen works.

Both have halos around the blue circle. CAS has a green halo and Glamayre has a black one. That's because Glamayre is sharpening the brightness without changing the colour, while (I assume) CAS is sharpening red green and blue separately. I made Glamayre sharpen brightness after seeing colour artefacts - for example on the menu screen of Horizon Zero Dawn. Actually you can see an example of an ugly colour artefact in your CAS screenshot - notice the bright green pixels at the edge of the orange wire above the monitor.

Perhaps Glamayre is oversharpenning very dark pixels (i.e. the dark grey monitor) too much relative to bright ones.

I'm staring at my code and I think I have an idea that might help... will experiment....

rj200 commented 1 year ago

I've tweaked sharpen so it won't push a pixel all the way to black. I hope it looks better for you in Quantum Break. I haven't got it to test with myself.

https://github.com/rj200/Glamarye_Fast_Effects_for_ReShade/commit/286f5cd55a44ed1ea6411a7366b305b9bc66aa8d

sanek7814 commented 1 year ago

This can be called version 6.4.2 By the way, I checked the new version in Deus Ex Human Revolution, the really black contours on the edges of the weapon became less noticeable.

odikzz2 commented 1 year ago

Can you add an option that exclude sharpening the distance i can also see this black outlines in sims 4 far away.

sanek7814 commented 1 year ago

The problem I think is solved.