▲ | mindbrix 9 days ago | |||||||||||||||||||||||||
I've been working on this problem on and off for over 10 years. AMA ;-) | ||||||||||||||||||||||||||
▲ | dahart 5 days ago | parent | next [-] | |||||||||||||||||||||||||
Nice work! I’d love to hear about your goals with this project, do you want to get it into PDF or browser engines, or anything like that? Mark Kilgard surveyed some path rendering engines with a few curves that most have trouble with. It’d be fun to see how Rasterizer stacks up, and perhaps a nice bragging point if you dominate the competition. https://arxiv.org/pdf/2007.12254 Having used the quadratic solver code that you found on ShaderToy (sqBezier), you might be able to shave some cycles by doing a constant-folding pass on the code. It can be simplified from the state it’s in. Also the constant in there 1.73205 is just sqrt(3), and IMO it’s nicer to see the sqrt(3) than the constant, and it won’t slow anything down, the compiler will compute the constant for you. Also, it might be nice to additionally link to the original source of that code on pouet. | ||||||||||||||||||||||||||
▲ | RossBencina 5 days ago | parent | prev | next [-] | |||||||||||||||||||||||||
Computer graphics is not my field, so forgive my ignorance, but could you explain the pros and cons of your "traditional graphics pipeline" approach and more "modern" approaches (I'm guessing that means doing most of the work in shaders)? At the moment, and looking towards the future, do you think hardware (mobile and mainstream desktop) will continue to support your approach just as well, or are shader-based approaches (I guess using multi-channel SDFs) likely to gain the upper hand at some point? | ||||||||||||||||||||||||||
| ||||||||||||||||||||||||||
▲ | andai 5 days ago | parent | prev | next [-] | |||||||||||||||||||||||||
This project made me happy. You mentioned Flash as an inspiration. Have you looked at how Ruffle is handling vector art? From what I recall they are converting it to triangles. Your solution (curves in the shaders?) seems both cheaper and more accurate, so I'm wondering if they could use it! | ||||||||||||||||||||||||||
| ||||||||||||||||||||||||||
▲ | vlaaad 5 days ago | parent | prev | next [-] | |||||||||||||||||||||||||
Have you compared performance of your solution to rive? | ||||||||||||||||||||||||||
| ||||||||||||||||||||||||||
▲ | geokon 5 days ago | parent | prev | next [-] | |||||||||||||||||||||||||
You mentioned winding numbers in a couple of places Wouldn't it make sense to do a "first pass" and eliminate paths that intersect themselves? (by splitting them into 2+ paths) I never understood why these are supported in the SVG spec. It seems like a pathological case. Once self-intersecting paths are eliminated the problem gets simpler.. no? Or would a CPU pass be cheating? | ||||||||||||||||||||||||||
| ||||||||||||||||||||||||||
▲ | SandmanDP 5 days ago | parent | prev | next [-] | |||||||||||||||||||||||||
Are there any culling optimizations for unseen elements when layering SVG images? Looks like this isn’t an optimization that comes out-of-the-box with OpenVG and all the major web browsers needed to add this, so wondering what your solution is doing. | ||||||||||||||||||||||||||
| ||||||||||||||||||||||||||
▲ | thisOtterBeGood 5 days ago | parent | prev | next [-] | |||||||||||||||||||||||||
How would you break down the problem with rendering 2D to someone who has no rendering background? Is there a single large issue or is it a complex multi-issue endeavour? | ||||||||||||||||||||||||||
| ||||||||||||||||||||||||||
▲ | Fraterkes 5 days ago | parent | prev | next [-] | |||||||||||||||||||||||||
So what part of the SVG-spec does this implement? Does it support text? Gradients? Filters like blur and dropshadow? | ||||||||||||||||||||||||||
| ||||||||||||||||||||||||||
▲ | mkesper 5 days ago | parent | prev | next [-] | |||||||||||||||||||||||||
Why did you release it only for personal use? Any chance for an OSI-approved license? | ||||||||||||||||||||||||||
▲ | BroomOfSYS 5 days ago | parent | prev [-] | |||||||||||||||||||||||||
What magic makes the zooming work? | ||||||||||||||||||||||||||
|