1.Use a new luma tiebreaker mechanism that divides alpha levels into 6 levels to avoid luma tiebreaker confusion between similar alpha pixels.
2.Added new gradient edge shape capture
3.Optimize the blending mechanism at the edge of the texture to prevent single pixel distortion
A lot of changes:
1. Use approximate pixels to capture more details
2. Use mixed to generate intermediate color pixels to create more texture transition details
3. Improved shape judgment, basically eliminating the bubble defects of the original version
Fix luma function to ensureluma increases linearly with alpha value
Use conditional weak blending instead of pixel copying to eliminate artifacts on straight lines Reduce algorithm overhead.
Improve the judgment logic
Improved the distance judgment between two pixes by changing the Euclidean formula to dot sets to reduce hardware overhead.
Improved some comments to make them easier to read.