Enhance MMPX, Fixed some defects in the original algorithm #1876
Enhance MMPX, Fixed some defects in the original algorithm #1876crashGG wants to merge 1 commit intoazahar-emu:masterfrom
Conversation
|
Huge thanks for looking at this one. This is something that had been bugging me for ages but I had never been able to look at it because my shader programming knowledge is lacking. |
|
Welcome to the Azahar Emulator repository! Due to the surge of AI bots we have decided to add an extra verification step to new contributors. Please follow the exact instructions in your own written Pull Request description to reopen it. |
|
The amount of code changed in this PR is huge, did you write all of this? |
|
Yes. It was initially submitted to ppsspp and Duckstation to fix some obvious bugs. You can see a very early version here |
|
Update Log: Fixed a bug in the original algorithm where "single jagged edges" were rounded; optimized the logic for determining transparent pixels. Simplified two functions and reused some pre-stored variables to improve performance. |
471ab2a to
90b629a
Compare
…ogical analysis Enhance MMPX, Fixed some defects in the original algorithm by morphological analysis
Enhance MMPX, Fixed some defects in the original algorithm by morphological analysis
lots of changes:
Use approximate pixels to capture more details
Use mixed to generate intermediate color pixels to create more texture transition details
Improved shape judgment, basically eliminating the bubble defects of the original version.
Almost rewrote most of the code.
Expanded morphological functions allow for greater control over details. The refactoring of the core algorithm (almost) completely eliminates bubbles generated by 4-pixel intersections.
The implementation of multiple early exit mechanisms significantly reduces computational overhead.
Prior to this PR, the shader had undergone extensive testing on other platforms.
The libretro port of this shader is available at [https://github.com/libretro/slang-shaders/blob/master/edge-smoothing/scalenx/shaders/mmpx-ex.slang] welcome feedback from retro game enthusiasts.
The ppsspp port of this shader is available at https://github.com/hrydgard/ppsspp/blob/master/assets/shaders/tex_mmpx_adv.csh
AI Usage Declaration
All algorithms and logic in this commit were authored by me.
AI was used only for:
Translating comments to English.
Fixing code syntax issues.