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

feat: make O'Mesh on Impeller great again #13

Merged
merged 4 commits into from
Aug 24, 2024

Conversation

renancaraujo
Copy link
Owner

@renancaraujo renancaraujo commented Aug 24, 2024

Description

Since the instability on Impeller seems to be specifically when we use .drawVertices with a FragmentShader, I figured if we pre-render all gradient patches in a temporary canvas, record it into a ui.Image instance and then use an ImageShader instead of a FragmentShader, impeller won't panic.

Of course, this has some performance overhead, but since #10, O'Mesh's performance has been so good, that it's unnoticeable in almost all hardware I tested (mac m1 and iPad a14).

But to be safe, I added two flags:

void main(){
  // Do this when you are opting out of impeller
  enableOMeshImpellerCompatibility = false;
  runApp();
}
void main(){
  // Do this when you are opting in into android impeller
  enableOMeshImpellerCompatibilityOnAndroid = true;
  runApp();
}

Breaking

The impellerCompatibilityMode option available on the widgets are not necessary anymore.

(Required) Link to the issue

#9

Copy link

cloudflare-workers-and-pages bot commented Aug 24, 2024

Deploying omesh with  Cloudflare Pages  Cloudflare Pages

Latest commit: dcdf53c
Status: ✅  Deploy successful!
Preview URL: https://73a751e8.omesh.pages.dev
Branch Preview URL: https://renan-make-meh-on-impeller-g.omesh.pages.dev

View logs

@renancaraujo renancaraujo merged commit 282136e into main Aug 24, 2024
3 checks passed
@renancaraujo renancaraujo deleted the renan/make-meh-on-impeller-great-again branch October 11, 2024 15:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant