3 ms·
I don’t agree that 2D is harder than 3D. Regardless on what you count, a page of text is much simpler to render than a frame in modern videogame. Even if you do
by Const-me 8y ago
I don’t agree that 2D is harder than 3D. Regardless on what you count, a page of text is much simpler to render than a frame in modern videogame. Even if you don’t cache TTF glyph textures.
I think it’s just legacy. For many decades before modern GPUs, 2D graphics was done in certain ways. People accumulated experience, wrote books, taught stuff to students in university.
Then modern GPUs happened, but initially only gamers and 3D graphics professionals had them, so 2D programmers couldn’t care less, their users just didn’t have hardware for GPU-based rendering. I think it was only around 2008-10 when non-game developers could finally use GPUs without sacrificing users base, and even at that time it meant “DX9 GPU” so no geometry or compute shaders.
I think people will adjust after a while. Professors teaching 2D graphics will stop talking about moveto/lineto and start talking about submitting triangles and writing shaders.
- lifthrasiir 8y ago> I think people will adjust after a while. Professors teaching 2D graphics will stop talking about moveto/lineto and start talking about submitting triangles and writing shaders. The 2D graphic system in the future will of course submit triangles and make use of shaders, but it is hard to imagine that we will be directly working with triangles. And we have taken the subtly broken scenary of raw 3D triangles granted (so far) but not tolerated jaggy 2D strokes. To resolve this dichotomy either 3D should go continuous (e.g. implicit surfaces) or 2D should go discrete as you suggest; the latter seems more unlikely.
- Const-me 8y ago> 2D graphic system in the future “The future is already here, it's just not evenly distributed” © William Gibson. It already works this way on modern Windows: WPF, UWP, and Direct2D already use GPUs. > it is hard to imagine that we will be directly working with triangles Most people doing 2D graphics on CPU don’t moveto/lineto either, they use higher-level libraries for that. To be good at it, you have to understand, to some extent, couple underlying abstraction layers. That’s why universities are teaching these basics. The basics for GPU-rendered 2D graphics are totally different, and until very recently only 3D graphics professionals cared about them. > either 3D should go continuous (e.g. implicit surfaces) You don’t necessarily need implicit surfaces. If you have a GPU ≤ 10 years old, you can convert 2D vector stuff to triangles on the fly. Here’s a simple example that renders a polyline: https://github.com/Const-me/vis_avs_dx/blob/master/avs_dx/DxVisuals/Effects/Render/PolylineGS.hlsl https://github.com/Const-me/vis_avs_dx/blob/master/avs_dx/Dx... It cuts a few corners e.g. doesn’t handle self-intersecting polylines particularly well if you have transparency, but it’s all fixable, that was an unpaid hobby project. Often you can do the same with Bezier/Nurbs, see tessellation stages in D3D11 docs.
- lifthrasiir 8y ago> It already works this way on modern Windows: WPF, UWP, and Direct2D already use GPUs. Oh, you are right. Even DirectWrite makes use of GPUs (and not just texture atlas) when you use a correct API. > [...] That’s why universities are teaching these basics. [...] I agree if you meant so. It is unfortunate that most university courses are not concerned with fundamentals or only concerned with outdated fundamentals.
- Const-me 8y ago> most university courses are not concerned with fundamentals or only concerned with outdated fundamentals. I don’t think they’re that bad. For things that are relatively stable, like compilers, file systems, OS kernels, or relational databases, universities are doing OK job. It’s just that GPUs have been evolving too fast for the last decade. They drive evolution of everything that runs on them. GPUs have become ridiculously powerful (in my desktop PC, GPU is 25 times faster than CPU doing math on floating-point numbers), so more and more stuff does run on them. Initially they only run 3D game engines, then 2D graphics, now also a lot of high-performance computing. When stuff gets ported from CPU to GPU it changes a lot due to very different architecture.
- mfabbri77 8y agoI wrote a full OpenVG1.x on top of OpenGL|Es1.x (fixed pipeline) engine: https://www.amanithvg.com https://www.amanithvg.com "Curves to straight line segments" and "polygon to triangles" was done in CPU, everything else in GPU. It was the year 2005 or so.