Skip to content
Commit 4566eae2 authored by Loïc Molinari's avatar Loïc Molinari Committed by Derek Foreman
Browse files

gl-renderer: Improve wireframe rendering



Render wireframe within paint nodes instead of drawing lines in a
second pass. The wireframe is blended over the node in a single draw
call. This slightly simplifies the logic by removing the computation
of a second set of indices and enables wireframe anti-aliasing using
Celes and Abraham's "Fast and versatile texture-based wireframe
rendering" paper from 2011.

Celes and Abraham use a one-dimensional set of texture coords for each
triangle edge, 1.0 for the 2 vertices defining the edge and 0.0 for
the other vertex, which basically define barycentric coords. Texture
mapping and the mip chain is then exploited to give a constant-width
edge. The main drawback of the technique is that contour edges of
node's damage mesh are drawn half as thick as interior lines since
each triangle draws half of each line's thickness.

Signed-off-by: default avatarLoïc Molinari <loic.molinari@collabora.com>
parent 0729ffbd
Pipeline #1212044 passed with stages
in 4 minutes and 43 seconds
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment