Skip to content
New issue

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

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

Already on GitHub? # to your account

vector: use triangulation instead of stencil buffers #3153

Open
11 tasks
hajimehoshi opened this issue Nov 3, 2024 · 2 comments
Open
11 tasks

vector: use triangulation instead of stencil buffers #3153

hajimehoshi opened this issue Nov 3, 2024 · 2 comments

Comments

@hajimehoshi
Copy link
Owner

hajimehoshi commented Nov 3, 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?

By triangulating a polygon (spliting a polygon into triangles), we can resolve these issues:

  • Rendering quality of edges is low (Vector anti-aliasing issue #3124): Now rendering vector.Path needs to use stencil buffers. A stencil buffer basically holds binary values and is not suitable for antialiasing edges. (By the way, MSAA would not work with concave polygons if I understand correctly.) Once we could triangulate polygons, we could apply some algorithms like Loop Blinn to render smooth edges.
  • Rendering polygon with a transparent color doesn't work (vector: allow transparent colors for AppendVerticesAndIndicesForStroke #2409). If a polygon is just a set of convex polygons, we could easily use transparent colors.

Also, if trinagulation works well, we can simplify Ebitengine implementations by removing stencil buffers.

Why is this needed?

No response

@hajimehoshi
Copy link
Owner Author

I feel like this is a little higher prioarity in order to deprecate ebiten.FillRule and stencil buffers inside.

@hajimehoshi
Copy link
Owner Author

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

1 participant