summaryrefslogtreecommitdiffstats
path: root/src/runtime/shaders/distancefieldtext_dropshadow_core.frag
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>2019-05-03 12:23:55 +0200
committerEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>2019-05-03 12:38:57 +0000
commitd2fcbf12bbec125a49b276d0f9be8ce24abf2525 (patch)
tree77524e818834e2d015cf2f6b71825aa30adf242c /src/runtime/shaders/distancefieldtext_dropshadow_core.frag
parent6945d224433d731aaff1f83bf4d05ba812c8c36c (diff)
Fix projection of distance field text and shader compliance
We were ignoring the projection matrix when calculating the alpha range of the distance field algorithm. In Qt Quick this is not necessary since there is no depth in the scene, but in 3D of course it became very obvious as the text moved closer to the camera. Note that there is still an issue visible when combining a scaling model matrix with proximity to the camera, but since this is a clear improvement, I commit it by itself and defer the other problem to a follow-up patch. Second note: This also fixes a bug where the texture width and height was not cast to float, which is not according to spec and will break on some drivers. Task-number: QT3DS-3343 Change-Id: Iddf00614c307ffc73119ecb37a4dfbb52dad78b1 Reviewed-by: Jere Tuliniemi <jere.tuliniemi@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Diffstat (limited to 'src/runtime/shaders/distancefieldtext_dropshadow_core.frag')
0 files changed, 0 insertions, 0 deletions