Fast rasterizing of text and vector art

2019-06-16 11:51发布

问题:

Suppose there is a lot of vector shapes (Bezier curves which determine the boundary of a shape). For example a page full of tiny letters.

What is the fastest way to create a bitmap out of it?

I once saw a demo several years ago (can't find it now) where some guys used GPU to rasterize the vector art - they were able to zoom in/out of the page in real-time. What is the current state of GPU rendering of Bezier shapes? Is it really fast? Faster than CPU? What are the common and not-so-common algorithms? Is there any open source library for such things? What language does it use? What about OpenGL?

回答1:

Perhaps you mean one of these papers:

  • Random-access rendering of general vector graphics (2008) (PDF)

  • Resolution independent curve rendering using programmable graphics hardware (2005) (PDF)

I think these are pretty much the state of the art.



回答2:

NVIDIA has now an extension for OpenGL that can do this stuff. I guess it's based on the Microsoft RAVG paper.

http://developer.nvidia.com/nv-path-rendering



回答3:

I once saw a demo several years ago (can't find it now) where some guys used GPU to rasterize the vector art - they were able to zoom in/out of the page in real-time.

Could it have been this one? http://alice.loria.fr/index.php/publications.html?Paper=VTM@2005

What is the current state of GPU rendering of Bezier shapes?

About the same like some years ago. Tesselation shaders do help, but when it comes down to rasterizing curves without a intermediary tesselation stage, it's grunt work in the fragment shader.