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 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.
@@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
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.
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.
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.
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.
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..
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.
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.
@@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.
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 )
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.
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!
@@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.
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.
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
@@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.
@@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
@@avramitra I also didn't abandon my project but I haven't worked on it for 2 months
"looks like we're alive" always makes me smile =D
Pretty sure he is saying live not alive but I like alive more for sure
@@Amplefii accidentally inspirational
How 'bout that?
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.
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.
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.
Interrobang go brrr…:
en.wikipedia.org/wiki/Interrobang
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.
Wait till you hear about MSDF! (Multi-channel SDF)
Next project idea: write a text editor in olive.c
In my opinion this text editor concept rocks 😎 👍
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..
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.
Got it. Burning the CI infra. Thanks for the video
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!😎
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?
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.
@@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.
@@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.
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 )
How does it work that saving the file makes it already work for the editor, no reset needed?
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.
Вы можете нажать alt + ascii код на цифровой клаве, чтобы проверить код символа, вместо того, чтобы смотреть ascii таблицу )
not on linux though lol
@@cassandradawn780 Oo I think it hardware (.
@@user-pm2ru6ir6n it's just a windows quirk, on linux you'd usually use either compose key or C-S-u
Hmmm next step is to matrix transform during scaling
LOL "Porn folder: 8gb - too small pepehands"
13:00 - I'd use date sorting if I were you
how to do zoom like this 3:03 ?
It is boomer*
@@pierreem0 ? what do you mean?
@@jojogay7297if my memory doesn't deceive me tsoding made a tool for that, maybe it's in his github
@@jojogay7297 Tsoding made a program called boomer some time ago which zooms on linux. It’s on github
@@gevilin153 ok thanks
tsoding please fix build for windows :(
^what he said
Check the execution policies
@@darioabbece3948 sry, wdym exactly/
early gang
🥇
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!
to understand it bruh
What is your interesting project idea?
well, if you never implemented ie a compiler, you have no fucking clue how a compiler works in real life. same for everything else
what kind of interesting idea you are doing?
@@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.
@Tsoding Daily do you have a link for your discord?
Idk if this is a troll, but at the beginning you say twitch dot television when actually the tv stands for tuvalu
i mean technically its television ?
@@gamersunite9026 en.wikipedia.org/wiki/.tv