diff options
author | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> | 2020-06-09 10:57:35 +0200 |
---|---|---|
committer | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> | 2020-06-15 10:20:21 +0200 |
commit | 90bf30376c94b2fcf99e2d8382b40e8881be47be (patch) | |
tree | fc7dac6b58b45afc7676c7dae82ce36ee78b2542 /.gitignore | |
parent | a8d357761dbf74cbdc72348be6c655cafb745ff2 (diff) |
Anisotropic antialiasing for distance field text
For perspective transforms, we need to find the sample
range in the glyph cache per pixel. We can do this by
getting the gradient of the distance field at the
specific pixel.
This will ensure proper antialiasing with any
projection, but has the limitation that when glyph contours
become thinner than a pixel, they may disappear or become
too emphasized, because the hardware-gradient - based on
neighbouring fragments - is not reliable at that scale.
So we should only default to this when we detect that the
text is child of a 3D scene.
To make this smooth, we need to know the mode of the renderer
when creating the shader. So QSGMaterial::createShader()
now takes a render mode that we can use to customize behavior
based on whether it is rendering into a 2D or 3D scene.
[ChangeLog][QtQuick] The QSGMaterial::createShader() virtual
function has been extended to take a render mode argument,
which can be used for any customizations needed in the case
where the shader will be used in combination with 3D perspective
transformations.
Fixes: QTBUG-84695
Change-Id: I5a18a4edbdfa07e8f9d506c42bb20e8eb580927d
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Diffstat (limited to '.gitignore')
0 files changed, 0 insertions, 0 deletions