Skip to content

Commit

Permalink
Rewrite CUT2 shader (#101)
Browse files Browse the repository at this point in the history
* Introduce antialiasing rejection in CUT2.

* Reduce sharpening when antialiasing is reduced.

* Improve antialiasing interpolation function.

* Change edge detection rules for antialiasing reduce.

* Add missing file.

* Tune sharpening function and parameters.

* Fix issue with edge sharpening formula.

* Completely rewrite how sharpening is done. This is more flexible and efficient.

* Fix soft edge weights and float packing issues.

* Make float packing more robust. This fixes the issue on some GPUs.

* Reintroduce pattern4. Fix attenuation function.

* Fix wrong order of clamp arguments.

* Move back to simpler attenuation function.

* Clamp maximum sharpness according to display density.

* Change soft edge contrast window. Tune the attenuation function.

* Remove some old attenuation function.

* Try a different approach. Adjusting threshold instead of sharpness.

* Refactor the CUT2 shader.

* Change how contrast is computed for softedges. Reintroduce attenuation.

* Greatly improved how weights are assigned and passed to the second stage.

* Fix wrong sharpness adjustments. Some performnace improvements.

* Performance improvements for the new CUT2 version.

* Some code cosmesis. Update default CUT2 parameters.

* Change edge detection rules to triangulate more. Guarantee continuity even if some edges overlap.

* Heavily simplify the second shader stage. This makes it faster and extendable in the future.

* Fix CUT2 code style issues.
  • Loading branch information
Swordfish90 authored Mar 19, 2024
1 parent 2a10632 commit fff2cc6
Show file tree
Hide file tree
Showing 5 changed files with 275 additions and 213 deletions.
Loading

0 comments on commit fff2cc6

Please sign in to comment.