summaryrefslogtreecommitdiffstats
path: root/src/extras/shaders/gl3/distancefieldtext.vert
Commit message (Collapse)AuthorAgeFilesLines
* QDistanceFieldMaterial: distance field text rendering shadersWieland Hagen2017-01-301-0/+19
One QDistanceFieldMaterial will have to be created for each distinct texture atlas that is used to store the glyphs of fonts. The smaller the glyphs are in pixel space (i.e. the more texels per pixel), the smoother we render the threshold between inside-glyph and outside-glyph. We measure the size of the glyph by taking the per-fragment delta of the texture coordinates. This is to reduce aiasing as much as possible without resorting to screen-space AA techniques. The same method is used in the QtQuick renderer, but here in this case we allow a much smoother threshold for small glyphs. Change-Id: I6632e7e1da31126c84f5bd2b4a4498377bdad79e Reviewed-by: Sean Harmer <sean.harmer@kdab.com>