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

ebiten: add DrawImageOptions.DisableMipmaps and DrawTrianglesOptions.DisableMipmaps #3095

Closed
11 tasks
hajimehoshi opened this issue Sep 12, 2024 · 1 comment
Closed
11 tasks

Comments

@hajimehoshi
Copy link
Owner

hajimehoshi commented Sep 12, 2024

Operating System

  • Windows
  • macOS
  • Linux
  • FreeBSD
  • OpenBSD
  • Android
  • iOS
  • Nintendo Switch
  • PlayStation 5
  • Xbox
  • Web Browsers

What feature would you like to be added?

We found some cases that mipmap increased draw calls unexpectedly. For example, when we created a shadow for a text, we created an offscreen with a shrunk text by x1/12 = 8.3% with the linear filter, and enlarged it by x12 with the linear filter.

image

The problem is, mipmap images were unexpectedly created. To make matters worse, pixels were unexpectedly from GPU in the restoration logic for Android.

In this shadow case, we don't need mipmaps. Even without mipmaps, the rendering result didn't look changed. Let's add an option to disable mipmap.

/CC @wasedaigo

Why is this needed?

In order to improve performance, especially for Android.

@hajimehoshi
Copy link
Owner Author

image

@hajimehoshi hajimehoshi changed the title ebiten: add an option to disable mipmap ebiten: add DrawImageOptions.DisableMipmaps and DrawTrianglesOptions.DisableMipmaps Sep 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant