Lines are computed once and cached in video memory and then rescaled using only shaders. To do the trick, for every vertex I store there is a vector saying in which direction a vertex should be moved and requested line width. In fragment shader I compute expected visible line width (taking into account current MVP matrix), and if it is too low I simply transform the offending vertex coordinate, so it is visible again. The same principle can be applied to fonts.
Regards, Orson On 04/18/2016 04:00 PM, Mário Luzeiro wrote: > I was looking into your shader the shaders and had the same idea... but it is > not possible to manage things like spacement etc.. because they will be > present always as individual an individual (triangle or point) entity on the > shader. > If you are able to know what text need to be render for each frame, so it > would be more flexible do it on software. > > Mario > > ________________________________________ > From: Maciej Sumiński [[email protected]] > Sent: 18 April 2016 14:46 > To: Mário Luzeiro; [email protected] > Subject: Re: [Kicad-developers] Bitmap fonts > > As you have already noticed - it is not. It may be moved back to > noncached container and it will be redrawn every frame. > > Another solution is to apply dynamic scaling using shaders - it is > already done for lines, so they do not disappear when their width is > smaller than 1 px. > > Regards, > Orson >
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Mailing list: https://launchpad.net/~kicad-developers Post to : [email protected] Unsubscribe : https://launchpad.net/~kicad-developers More help : https://help.launchpad.net/ListHelp

