Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Different algorithm for imageCleanTransparent #14478

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

Desour
Copy link
Member

@Desour Desour commented Mar 20, 2024

  • Goal of the PR: Make imageCleanTransparent faster.
  • How does the PR work: First scale the image down, to all levels, up to 1x1. Then go the other direction, and bilinear sample the lower-resolution texture where the higher-resolution texture has alpha below threshold.
  • See Texture modifiers and imageCleanTransparent are too slow #14322.

Results

Performance is noticeably better. But it's not optimal.

Left is master, right is PR:
left_master_right_PR

To do

This PR is a Work in Progress.

  • Make threshold always 0.
  • Convert images to argb8, to remove old code.
  • Clean up code.

How to test

@Desour Desour added WIP The PR is still being worked on by its author and not ready yet. Performance Textures @ Client rendering labels Mar 20, 2024
@Desour Desour force-pushed the imagecleantransparent_different_alg branch from d01cdfa to 2fdf26a Compare March 20, 2024 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@ Client rendering Performance Possible close Textures WIP The PR is still being worked on by its author and not ready yet.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants