nv_path_rendering
TRANSCRIPT
![Page 1: NV_path_rendering](https://reader033.vdocuments.site/reader033/viewer/2022060109/5557ffe4d8b42a200d8b51dc/html5/thumbnails/1.jpg)
An Introduction toNV_path_rendering
Mark J. KilgardNVIDIA Corporation
June 8, 2011
![Page 2: NV_path_rendering](https://reader033.vdocuments.site/reader033/viewer/2022060109/5557ffe4d8b42a200d8b51dc/html5/thumbnails/2.jpg)
Purpose of this Presentation
Overview of GPU-accelerated path renderingUsing “stencil, then cover”
Explain and demonstrate the NV_path_rendering APIAimed primarily at programmers
Introduce you to the content of NVIDIA’s NVpr SDK
![Page 3: NV_path_rendering](https://reader033.vdocuments.site/reader033/viewer/2022060109/5557ffe4d8b42a200d8b51dc/html5/thumbnails/3.jpg)
What is path rendering?A rendering approach
Resolution-independent two-dimensional graphicsOcclusion & transparency depend on rendering order
So called “Painter’s Algorithm”Basic primitive is a path to be filled or stroked
Path is a sequence of path commandsCommands are
– moveto, lineto, curveto, arcto, closepath, etc.
StandardsContent: PostScript, PDF, TrueType fonts, Flash, Scalable Vector Graphics (SVG), HTML5 Canvas, Silverlight, Office drawingsAPIs: Apple Quartz 2D, KhronosOpenVG, Microsoft Direct2D, Cairo, Skia, Qt::QPainter, Anti-grain Graphics,
![Page 4: NV_path_rendering](https://reader033.vdocuments.site/reader033/viewer/2022060109/5557ffe4d8b42a200d8b51dc/html5/thumbnails/4.jpg)
Path Filling vs. Stroking
just filling just stroking
filling + stroke =intended content
![Page 5: NV_path_rendering](https://reader033.vdocuments.site/reader033/viewer/2022060109/5557ffe4d8b42a200d8b51dc/html5/thumbnails/5.jpg)
Handling Common Path RenderingFunctionality: Filtering
GPUs are highly efficient at image filtering
Fast texture mappingMipmappingAnisotropic filteringWrap modes
CPUs aren't really
� GPU
� Qt
� Cairo
Moiréartifacts
![Page 6: NV_path_rendering](https://reader033.vdocuments.site/reader033/viewer/2022060109/5557ffe4d8b42a200d8b51dc/html5/thumbnails/6.jpg)
Projective Path Rendering SupportCompared
� GPUflawless
� Skiayes, but bugs
� Cairounsupported
� Qtunsupported
correct
wrong
correct
correct
unsupported
unsupported
unsupported
unsupported
![Page 7: NV_path_rendering](https://reader033.vdocuments.site/reader033/viewer/2022060109/5557ffe4d8b42a200d8b51dc/html5/thumbnails/7.jpg)
Rendering Paths Clipped toSome Other Arbitrary Path
Example clipping the PostScript tiger to a heart constructed from two cubic Bezier curves
unclipped tiger tiger with pink background clipped to heart
![Page 8: NV_path_rendering](https://reader033.vdocuments.site/reader033/viewer/2022060109/5557ffe4d8b42a200d8b51dc/html5/thumbnails/8.jpg)
Benchmark Scenes
Tiger Dragon Round Dogs Butterfly Spikes
Coat of Arms Cowboy Buonaparte Embrace Japanese Strokes
![Page 9: NV_path_rendering](https://reader033.vdocuments.site/reader033/viewer/2022060109/5557ffe4d8b42a200d8b51dc/html5/thumbnails/9.jpg)
Learning NV_path_rendering
White paper + source code available“Getting Started with NV_path_rendering”
ExplainsPath specification“Stencil, then Cover” API usageInstanced rendering for text and glyphs