Hardware accelarated 2D graphics

Started by
13 comments, last by OrangyTang 15 years, 9 months ago
Quote:Original post by chairthrower
Could I ask a question that is on topic - I am very ignorant about accelerated hardware but would it possible to speculate whether a late model accel-card (nvidia 8800) would be able to render a screen full of text (such as a displayed word document or firefox tab) using just the glyph polys and poly-holes constructred from bezier geometry (this is easily extracted using freetype). If so how would this be done - can the card (in 2d) work with raw poly geometry or would the beziers need to be interpolated on the cpu. also would triangulation of the polys need to be done on the cpu or can opengl or directx handle this directly. do shaders have any application here.

Sounds like you want Resolution Independent Curve Rendering using Programmable Graphics Hardware. It's a fragment shader which can use a single triangle to fill a bezier curve. You do a limited amount of triangulation at startup to extract the curves and solid areas, but other than that you don't need to triangulate it at runtime. Since the shader is quite small I've seen it get very fast results with a page full of text.
Advertisement
That is extremely impressive - there is an initial constrained delunay triangulation but this can be factored out as a preprocessed job and everything before the internals of the shader is treated vectorially. possibly the complicated job of laying out text (respecting kerning etc) could even be achieved on the card once the geometry is uploaded.

I note that that the technology arising from the paper is patentend - but I guess I have to ask if there might be an implementation (shader+triangulator) that might be available that could be experimented with (for non-expert groups and mortals like myself) apart from maybe wpf if it is being used there.
Quote:Original post by OrangyTang
Quote:Original post by chairthrower
Could I ask a question that is on topic - I am very ignorant about accelerated hardware but would it possible to speculate whether a late model accel-card (nvidia 8800) would be able to render a screen full of text (such as a displayed word document or firefox tab) using just the glyph polys and poly-holes constructred from bezier geometry (this is easily extracted using freetype). If so how would this be done - can the card (in 2d) work with raw poly geometry or would the beziers need to be interpolated on the cpu. also would triangulation of the polys need to be done on the cpu or can opengl or directx handle this directly. do shaders have any application here.

Sounds like you want Resolution Independent Curve Rendering using Programmable Graphics Hardware. It's a fragment shader which can use a single triangle to fill a bezier curve. You do a limited amount of triangulation at startup to extract the curves and solid areas, but other than that you don't need to triangulate it at runtime. Since the shader is quite small I've seen it get very fast results with a page full of text.


Any idea if that is any faster that building the triangles at load time for a bezier curve and just rendering, with very little in the shader?
oops ignore the question - i found an implementation (sorry Lode for my semi-hijacking of your thread)
Quote:Original post by Dave
Quote:Original post by OrangyTang
Quote:Original post by chairthrower
Could I ask a question that is on topic - I am very ignorant about accelerated hardware but would it possible to speculate whether a late model accel-card (nvidia 8800) would be able to render a screen full of text (such as a displayed word document or firefox tab) using just the glyph polys and poly-holes constructred from bezier geometry (this is easily extracted using freetype). If so how would this be done - can the card (in 2d) work with raw poly geometry or would the beziers need to be interpolated on the cpu. also would triangulation of the polys need to be done on the cpu or can opengl or directx handle this directly. do shaders have any application here.

Sounds like you want Resolution Independent Curve Rendering using Programmable Graphics Hardware. It's a fragment shader which can use a single triangle to fill a bezier curve. You do a limited amount of triangulation at startup to extract the curves and solid areas, but other than that you don't need to triangulate it at runtime. Since the shader is quite small I've seen it get very fast results with a page full of text.


Any idea if that is any faster that building the triangles at load time for a bezier curve and just rendering, with very little in the shader?

That'd be missing the point - the idea is that since the shader does the curve rendering you don't need to tessalate the curves. If you do the tessalation manually then it's not going to be resolution independant, as if you zoom in you'll eventually see the individual triangles.

This topic is closed to new replies.

Advertisement