I’m a complete beginner. Rendered my first triangle and rectangle today. Now I’m trying to render a rectangle with smooth corners, but I’m not sure what shaders I will need for this. As input ideally I want to provide upper-left corner position (for now, let’s say in screen coordinates) plus width and height, or center + height and width would also work. Corner radius can be hard-coded.
Now, from these two references:
What a vertex shader outputs information for one vertex, and fragment shader outputs information for one pixel. What I want in GPU is given the coordinates as described above, it should draw a full rectangle with rounded corners. So I will provide one input, and it will output many pixels. There are lots of examples on shadertoy (e.g. Shader - Shadertoy BETA) and similar sites but I don’t understand the language they’re using. Their shaders look nothing like the ones in e.g. https://open.gl tutorials. I’m using version 330 core. I’m not interested in GLES.
What do I need to look at next for this?