On 04/15/2016 02:01 PM, Mário Luzeiro wrote: > Here is the result of my test (attached) > > Question: Is the text rendered every draw frame? > > If yes: > My suggestion was to clamp to a max size (in order to render the text 1:1 on > relation to the font pixel size in the texture) and to a minimum (or not > display it.. ) > See the too_big.png issue. > I think as this is informative text it can be render dynamically and doesn't > not matter the exactly position / scale.
Maybe it would be enough just to double the font atlas texture size? I suppose people do not spend much time staring at pads at such zoom level, so it should not be a major problem. I like when KiCad looks nice, but it is not the main objective here, so we have to decide when it looks good enough. > mipmap_spacing_issue.png: > I notice for some zoom levels that there are "blur margin" effects issues. > I believe it may be fixed if you increase the spacing of the chars in the > texture. (So you may need to decrease the font size to keep the same texture > size) Good point, I have not noticed them before. From what I see, it is a byproduct of OpenGL way of mipmapping. I will have a look at it. Regards, Orson > Mario > > ________________________________________ > From: Kicad-developers > [kicad-developers-bounces+mrluzeiro=ua...@lists.launchpad.net] on behalf of > jp charras [jp.char...@wanadoo.fr] > Sent: 15 April 2016 11:39 > To: kicad-developers@lists.launchpad.net > Subject: Re: [Kicad-developers] Bitmap fonts > > Le 15/04/2016 11:21, Maciej Sumiński a écrit : >> On 04/14/2016 06:39 PM, Simon Richter wrote: >>> Hi, >>> >>> On 14.04.2016 11:33, Maciej Sumiński wrote: >>> >>>> Currently, the most expensive thing to draw is stroked text, as there >>>> are lots of labels on tracks and pads. To reduce the drawing cost (and >>>> memory requirements), texts that are not targeted to Gerber files (i.e. >>>> pad & track labels) might be displayed using bitmap fonts. This way, a >>>> single letter cost is reduced from tens of triangles to just two. >>> >>> Do these actually need to be stored, or can they be generated on the fly >>> from some simpler representation? >>> >>> Simon >> >> Previously they were generated on the fly for every frame. Storing them >> occupied a lot of memory, so I decided to generate them only when >> appropriate (i.e. they are in the current view area and the zoom level >> is high enough). >> >> Another solution that comes to my mind is some kind of >> pseudo-instancing, where the stroked font lines are stored once and the >> video card receives only a range of indexes to draw and a transformation >> matrix to apply. That should be not that hard to introduce. >> >> Still, it is hard to beat 2 triangles per character. I am willing to >> increase the font texture atlas resolution if people are not satisfied >> with the outcome. >> >> Regards, >> Orson > > Orson, > > I just tested your last version, and I find the result rather good. > > Only one thing: I have some trouble to understand the criteria used to decide > if pad numbers and net > names are shown or not: > For a given pad (i.e. font size), it depends not only on the zoom level (this > is what I was > expecting), but also on other things like the fact you are zooming from high > level to low level or > the opposite, and the board area shown on screen. > > Thanks. > > > -- > Jean-Pierre CHARRAS > > _______________________________________________ > Mailing list: https://launchpad.net/~kicad-developers > Post to : kicad-developers@lists.launchpad.net > Unsubscribe : https://launchpad.net/~kicad-developers > More help : https://help.launchpad.net/ListHelp >
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Mailing list: https://launchpad.net/~kicad-developers Post to : kicad-developers@lists.launchpad.net Unsubscribe : https://launchpad.net/~kicad-developers More help : https://help.launchpad.net/ListHelp