Replies: 2 comments 1 reply
-
Hi @ouzhou, You understood perfectly :) The function to get the distance between the pixel and the Bézier curve is a bit tough, and I shamelessly copied it from @Yomguithereal's sigma-experiments. Also, the fact that the segment joining both nodes is one rectangle's side causes a bug, since sometimes there are pixels on the other side on this segment that should be colored as well, when the edges are too large: |
Beta Was this translation helpful? Give feedback.
-
What optimizations has Sigma made for anti-aliasing in WebGL? For example, does it double the overall canvas size and then scale it down to 1 using CSS? Question: Besides using mix for anti-aliasing, does node-circle have any other anti-aliasing optimizations? in src/rendering/programs/node-circle/frag.glsl.ts
|
Beta Was this translation helpful? Give feedback.
-
I want to understand how to create a Bezier curve. As far as I understand, it involves creating two triangles between two points to form a rectangle. The width of the rectangle is the distance between the two points, and the height is determined by the position of the control point. Then, pixels outside the curve are discarded using a shader function.
Is my understanding correct?
Beta Was this translation helpful? Give feedback.
All reactions