Legendary Font Rendering

Поділитися
Вставка

КОМЕНТАРІ • 62

  • @avramitra
    @avramitra Рік тому +56

    You're such a motivation booster for me..
    Whenever I feel like loosing interest in my projects either because things are not working out as intended, or thoughts like "why bother? No one will ever use it" cloud my mind, I watch your videos.
    It motivates me, gives me ideas, teach me new things, and does many other positive stuffs with my smol brain.
    THANK YOU.

    • @botbeamer
      @botbeamer Рік тому +3

      Same, as someone who has been working on a sdf font renderer for 2 years and have half abandoned it it gives me bit of motivation to work more on it

    • @avramitra
      @avramitra Рік тому +3

      @@botbeamer As someone who has been working on a gui library for embedded systems for 2 years (for reasons unknown) and almost abandoned it twice, I understand you 100%. Keep working on your project, you got it.

    • @botbeamer
      @botbeamer Рік тому +2

      @@avramitra Yeah a GUI library for embedded systems sounds like a great project it's something I'm interested in too if you can drop the repository for it or anything

    • @botbeamer
      @botbeamer Рік тому

      @@avramitra I also didn't abandon my project but I haven't worked on it for 2 months

  • @old_cd_rom9518
    @old_cd_rom9518 Рік тому +30

    "looks like we're alive" always makes me smile =D

    • @Amplefii
      @Amplefii Рік тому +14

      Pretty sure he is saying live not alive but I like alive more for sure

    • @omnacky
      @omnacky Рік тому +2

      ​@@Amplefii accidentally inspirational

    • @NathanHedglin
      @NathanHedglin Рік тому +4

      How 'bout that?

  • @DayzoIRL
    @DayzoIRL Рік тому +10

    At 49:00, you show how the openGL docs mention derivatives all the time, but never tell which function we are taking the derivative of. The function in question is the image being processed. Images are discrete functions F(x,y) that take the coordinates of a pixel as input and return the color at that position. The discrete counterpart of the Derivative, used in image processing, is defined by the difference (subtraction) to adjacent pixels. So if F is our image function, and dFdX and dFdY are the partial derivatives in the x and y direction at a given pixel; we compute dFdX by subtracting the current pixel from a laterally adjacent one; while for dFdY we subtract with a vertically adjacent one.

  • @DFPercush
    @DFPercush Рік тому +9

    Very cool! I saw The Cherno do something like this with his game engine, but it was a kind of obscure library by some professor to turn the glyphs into SDF. I guess FreeType caught on to the need for something like that. Glad to see they support it. The tidbit about derivatives in the GPU was also very interesting, I'll have to remember that for later.

  • @SimGunther
    @SimGunther Рік тому +8

    35:17 That'd be neat to have an "explanation mark", which is somewhere between a question mark and an exclamation point to show enthusiasm about the topic while also demanding some explanation for why things work the way they do.

    • @_lapys
      @_lapys Рік тому +3

      Interrobang go brrr…:
      en.wikipedia.org/wiki/Interrobang

  • @younghsiang2509
    @younghsiang2509 Рік тому +4

    freetype actually supports 2 different SDF modes: one is SDF from glyph outlines, one is called BSDF which stands for bitmap sdf. And bitmap sdf uses a Anti-aliased EDT algorithm to get a competitive result with outline sdf, but performs way more faster. And actually, you can make it even more faster if you write it yourself using floating point math, since freetype uses a fixed-point math.

  • @jimmorrison6177
    @jimmorrison6177 Рік тому +6

    Wait till you hear about MSDF! (Multi-channel SDF)

  • @kristoff_t2013
    @kristoff_t2013 Рік тому +6

    Next project idea: write a text editor in olive.c

  • @Mirko_ddd
    @Mirko_ddd Рік тому +2

    In my opinion this text editor concept rocks 😎 👍

  • @designerfuzzi
    @designerfuzzi Рік тому

    fwidth converts a value into a 2dimensional "matrix" which allows to render kernels aka thresholds depending on their neighbour. Despite it doesnt use kernels at all, but the technique is the same because the "kernels" neighbours are expressed as signed distances rather than colours and as you do each pixel, you just need one extra dimension to make it work..

  • @AussieRossco
    @AussieRossco Рік тому

    Wow. I checked my quality setting in one of the later vids cause it looked so good. This was why! It comes through UA-cam so crisp, all code vids could use some of this action.

  • @QckSGaming
    @QckSGaming Рік тому +1

    Got it. Burning the CI infra. Thanks for the video

  • @133289ify
    @133289ify Рік тому +2

    It would be cool to render fonts as you zoom in so they are alwasy crisp. Sorry didn't watch the whole thing. Very cool editor dude!😎

  • @adammontgomery7980
    @adammontgomery7980 Рік тому +4

    I don't understand the hot reloading at 26:00 doesn't the shader have to be compiled? Are you compiling shaders in the main program loop?

    • @cacheman
      @cacheman Рік тому +3

      They're compiled via OpenGL calls after the source is loaded. OpenGL consumes shader source code by default. You'd have to use an extension to load externally compiled SPIR-V byte-code for example. This would massively complicate the code for not much benefit.

    • @adammontgomery7980
      @adammontgomery7980 Рік тому +1

      @@cacheman that's kinda what I mean. He has to be calling glCompileShader inside the main loop. Guess I could just look at the source, but I'm being lazy, and I've only ever done the hello world (rainbow triangle) in opengl.

    • @cacheman
      @cacheman Рік тому +4

      ​@@adammontgomery7980 I guess I don't get your concern. It's not like the compile is happening _every frame_, it happens once when you press a key.

  • @lolcat69
    @lolcat69 Рік тому +5

    not gonna lie, maybe i am going to see the code and make it like vim ( so you have writing mode, and the other to put commands that do things, that would be really cool )

  • @bibliusz777
    @bibliusz777 8 місяців тому

    How does it work that saving the file makes it already work for the editor, no reset needed?

    • @tildessmoo
      @tildessmoo 2 місяці тому +1

      The shaders are technically separate programs run on the GPU instead of the CPU, and the way OpenGL works is that they're compiled and linked at runtime; in fact, you need to call glCompileShader() and glLinkProgram() in your code to use the shaders you write. Once they're in the GPU's memory, the shader files aren't needed anymore during the current iteration of the program, so they can be freely edited and saved. He just put calls to those functions (well, a function that sets up the shaders for compilation, compiles and links them, and cleans up the old programs) in the event loop so it'll run when he hits F5. It's actually pretty similar to the way Handmade Hero set up hotloading DLLs to tweak the game's code without closing and reopening the program, except in this case compilation and linking are called from within the program instead of having to have a compiler open in another window.

  • @user-pm2ru6ir6n
    @user-pm2ru6ir6n Рік тому

    Вы можете нажать alt + ascii код на цифровой клаве, чтобы проверить код символа, вместо того, чтобы смотреть ascii таблицу )

    • @cassandradawn780
      @cassandradawn780 Рік тому

      not on linux though lol

    • @user-pm2ru6ir6n
      @user-pm2ru6ir6n Рік тому

      @@cassandradawn780 Oo I think it hardware (.

    • @cassandradawn780
      @cassandradawn780 Рік тому

      @@user-pm2ru6ir6n it's just a windows quirk, on linux you'd usually use either compose key or C-S-u

  • @ratherbyexploring4898
    @ratherbyexploring4898 9 місяців тому

    Hmmm next step is to matrix transform during scaling

  • @syntaxed2
    @syntaxed2 Рік тому +1

    LOL "Porn folder: 8gb - too small pepehands"

  • @vikinggeorge7007
    @vikinggeorge7007 5 місяців тому

    13:00 - I'd use date sorting if I were you

  • @jojogay7297
    @jojogay7297 Рік тому +1

    how to do zoom like this 3:03 ?

    • @pierreem0
      @pierreem0 Рік тому +1

      It is boomer*

    • @jojogay7297
      @jojogay7297 Рік тому

      @@pierreem0 ? what do you mean?

    • @gevilin153
      @gevilin153 Рік тому

      ​@@jojogay7297if my memory doesn't deceive me tsoding made a tool for that, maybe it's in his github

    • @gaafts
      @gaafts Рік тому +1

      @@jojogay7297 Tsoding made a program called boomer some time ago which zooms on linux. It’s on github

    • @jojogay7297
      @jojogay7297 Рік тому

      @@gevilin153 ok thanks

  • @distant6606
    @distant6606 Рік тому +3

    tsoding please fix build for windows :(

  • @NuclearShadowYT
    @NuclearShadowYT Рік тому +2

    early gang

  • @aaabbb-gu5pz
    @aaabbb-gu5pz Рік тому +2

    All good, very clever, even interesting, BUT Why?!?!?!
    Why to waste so many efforts and time to reinvent the wheel, invent on low level as this, super optimized by generations of genius specialists is already (from many years) realized, on cheap Hardware level!
    The main problem of the contemporary programmer is lack of original interesting project ideas!

    • @gevilin153
      @gevilin153 Рік тому +18

      to understand it bruh

    • @user-dt5dw6oq3f
      @user-dt5dw6oq3f Рік тому +13

      What is your interesting project idea?

    • @miko007
      @miko007 Рік тому +9

      well, if you never implemented ie a compiler, you have no fucking clue how a compiler works in real life. same for everything else

    • @botbeamer
      @botbeamer Рік тому +6

      what kind of interesting idea you are doing?

    • @aaabbb-gu5pz
      @aaabbb-gu5pz Рік тому +1

      @@user-dt5dw6oq3f , nothing. I said, the main problem of the contemporary developer is lack of really useful interesting idea, scientific idea, not something for money and even not for to time kill.
      I lastly for fun make simple program to calculate factorial for arbitrary big integer numbers. It works up to several hundred digits like the python math.factorial, but for bigger numbers, it become relatively very slow. I see that python authors use very interesting pure mathematics algorithm. So in all - the basic is some narrow specialized extremely complex pure mathematical or physical problem. This is dying coder type nowadays, is not it?!
      To learn so complex things and invest time, money, etc., the project must be with some sense, I think, if the developer is not very, very very young and again - it is not very useful to jump so deep in reinventing the wheel, simply the time moves so fast now... Simply my thoughts, may be I describe the common problems for the developers in the 21 century in general; of course, admiration for the channel author.

  • @SuncoastSoftware
    @SuncoastSoftware Рік тому

    @Tsoding Daily do you have a link for your discord?

  • @galen981
    @galen981 Рік тому +1

    Idk if this is a troll, but at the beginning you say twitch dot television when actually the tv stands for tuvalu