Ok, you have a point here. It seems that if we want to have it, then we
have to switch back to storing texts in noncached container and send
them every frame. Still, it is much cheaper than drawing using stroked
font, so it should be feasible.

On 04/18/2016 04:23 PM, Mário Luzeiro wrote:
> But for fonts, you are dealing with individual chars, each char depends on 
> the position of the last char. So if you scale it you also change the 
> position of the next chars (and scale).
> I believe it will not (easily) possible on shaders to move the position of 
> the next chars based on the previous shader calculation :/
> ________________________________________
> From: Maciej Sumiński [[email protected]]
> Sent: 18 April 2016 15:12
> To: Mário Luzeiro; [email protected]
> Subject: Re: [Kicad-developers] Bitmap fonts
> 
> 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
>>
> 
> 


Attachment: 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

Reply via email to