nv_path_rendering

Post on 17-May-2015

303 Views

Category:

Technology

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

An Introduction toNV_path_rendering

Mark J. KilgardNVIDIA Corporation

June 8, 2011

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

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,

Path Filling vs. Stroking

just filling just stroking

filling + stroke =intended content

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

Projective Path Rendering SupportCompared

� GPUflawless

� Skiayes, but bugs

� Cairounsupported

� Qtunsupported

correct

wrong

correct

correct

unsupported

unsupported

unsupported

unsupported

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

Benchmark Scenes

Tiger Dragon Round Dogs Butterfly Spikes

Coat of Arms Cowboy Buonaparte Embrace Japanese Strokes

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

Feedback and Contacts

We need your feedbackIssues?Questions?

Contact us by emailingnvpr-support@nvidia.com

top related