Comments (8)
You have to invoke earcut for each individual separated polygon. If you require more specific help you can provide some polygons you get from clipper as output and I'm happy to show you how to prepare them to run earcut on them.
from earcut.hpp.
An alternative to multisampling is supersampling, basically you increase the size of the texture by a factor of 2x, 4x or 8x, scale the polygons by the same amount, render them to the texture and finally downscale the output texture back to your desired size.
from earcut.hpp.
Thank you for your reply, I seem to have found a way. I'm making an SVG library, using Clipper to do clipping, and Earcut to triangulate. But because I have to run on OpenGL ES 3.0 hardware, I need to render to textures. OpenGL ES 3.0 does not yet support multi-sampling of textures. Is there any good solution for this?
from earcut.hpp.
from earcut.hpp.
This will lead to too much pixel filling, and the performance will be affected
from earcut.hpp.
I'm considering whether I can use clipper to make an edge offset, then triangulate the offset part, and then make an alpha transition in GPU shader. I don't know if this is the right direction
from earcut.hpp.
I think your solution would be quite blurry, but you can try. Before you do, try to check if the 'EXT_multisampled_render_to_texture' extension is available and use it instead.
from earcut.hpp.
I tried to use msaa and found that the effect is not good. It should be provided by hardware, there may be many differences.
I now use clipper to cut and triangulate through earcut, but I need anti-aliasing, so I wonder if I can add some redundant data through the vertices to interpolate, and then use the shader to determine whether the current pixel is Near the edge? Is there such a technique?
@mrgreywater
from earcut.hpp.
Related Issues (20)
- 'cut' introduced in complex polygon HOT 1
- New test “issue142” in 2.2.4 fails on aarch64, ppc64le, s390x HOT 1
- Member function of Earcut Assumes that the point type has a size member function HOT 5
- Helper function for earcutting just a std::vector<> of points HOT 1
- Incorrect Triangulation HOT 1
- missing triangle HOT 2
- Builds wrong indices array for concave polygon HOT 2
- The Ear Point judgment HOT 2
- Coverity scan fails HOT 1
- Transfer Appveyor project to Mapbox? HOT 4
- Clang-Tidy static analysis warning: dereference of a null pointer HOT 2
- Issues with triangulating a polygon with 3d coords HOT 1
- How to clip with an outside polygon HOT 1
- Infinite loop in cureLocalIntersections HOT 2
- Endless loop in the filterPoints function HOT 1
- Any way to make this use even-odd rule? HOT 1
- Port infinite loop fix HOT 1
- Please consider adding a version tag on commit 6d18edf0ce046023a7cb55e69c4cd9ba90e2c716 or later HOT 4
- Test “self_touching” fails on aarch64, ppc64le, s390x HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from earcut.hpp.