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

vector: use triangulation instead of stencil buffers #3153

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

vector: use triangulation instead of stencil buffers #3153

hajimehoshi opened this issue Nov 3, 2024 · 0 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

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