Mythfall Devlog: Custom Immediate Mode UI

Поділитися
Вставка
  • Опубліковано 24 гру 2024

КОМЕНТАРІ • 8

  • @consumeentertainment9310
    @consumeentertainment9310 4 місяці тому

    I will look into it again in detail. Thank you for the explanation!😻

  • @TheBrotado
    @TheBrotado 4 місяці тому

    I feel like it is finally time for that "x years into developing my dream Indi-mmorpg" video!

  • @MisterPanCakeYamaguchi
    @MisterPanCakeYamaguchi 4 місяці тому

    Hes back wooohoo

  • @HedgeThorne
    @HedgeThorne 18 днів тому

    What's the reason for using an SDF? If you're already rasterizing a font, normally you'd just rasterize at a larger font size, right? Only reason I'd use an SDF typically is for text that is on a 3d surface that the user can approach in first person or rotate like a CAD model. Good for handling 3d perspective distortion while minimizing artifacts. For normal UI rendering I'd rasterize into multiple font atlases as a build step and pick the closest size at runtime. (Usually though I rasterize at runtime in exactly the right size.) Good pixel fonts come in multiple sizes too, so you could just pick a size that evenly divides the closest to the size you wanted.

    • @UnitOfTimeYT
      @UnitOfTimeYT  18 днів тому

      Yeah. definitely valid points. And I do agree, I think the major use case for SDF is 3D. In my case I just have so many different font sizes, and also wanted features like font borders and maybe glow. So I just opted to use SDF as a replacement for rasterizing multiple texture atlases. My renderer doesn't yet support automatic texture batching, so I have to do everything statically. I gave up on pixel fonts I just had too much trouble getting them to work and be readable for multiple DPIs. Integer scaling was kind of a pain, I needed to get like a 1.5 or a 0.5 scale for the font which wont work for pixel fonts. So I gave up some precision just to have a single font rendering solution that worked for my entire game.
      I think the solution I have now mostly looks good. There are a few areas where I have troubles, mostly when the text size gets really small.

  • @MrDermases
    @MrDermases 4 місяці тому

    Great video!, what is the diagram website you are using?
    Edit: Figured it out, its Obsidian

  • @Kio_Kurashi
    @Kio_Kurashi 4 місяці тому

    I mean... the only diffference between rasterized fonts and pixel fonts is the maximum size of a given pixel. So you just used bigger pixel fonts.

    • @UnitOfTimeYT
      @UnitOfTimeYT  4 місяці тому

      Yeah I didn't do a good job explaining the distinction. What I mean by pixel fonts is a font with no aliasing. So lets say you rasterize a pixel font to an atlas and lets say a rune is 20px square, when you draw it to the screen if you scale it by 1.5 you'll draw to a 30px square which causes the virtual pixels to not line up with the physical screen pixels (This makes some virtual pixels look awkwardly larger than others). So you can rasterize a font that supports aliasing which would blur the edges and make it a little bit more scalable. but then if you scale it too far it starts to look blurry, which is when you'd use Signed Distance Fields.
      Thanks for watching!