4 ms·
I wonder how the GPU version is implemented. One quad and one texture draw per glyph sounds very not scalable, but one quad per terminal, one texture atlas and
by cluckindan 1y ago
I wonder how the GPU version is implemented. One quad and one texture draw per glyph sounds very not scalable, but one quad per terminal, one texture atlas and one shader to draw glyphs from the atlas already sounds much better.
- henning 1y agoOne quad per glyph is very scalable, especially if you use instanced rendering. Each quad is just reading from a single texture atlas. GPUs are beastly blitting machines. Runs at ~1500 FPS with a 6K screen of full text on my machine even when text is being updated at about the pace of a 150 WPM typist but you only update quads that strictly need to change and store font metrics on the GPU in a buffer. A full screen refresh where you send quad data for 750 Lorem ipsum paragraphs every frame runs at 300 FPS on my hardware.
- Snild 1y agoA terminal maximized on my screen says: ~$ echo $((2 * LINES * COLUMNS)) triangles 34272 triangles That's nothing for a modern GPU. For example, this benchmark[1] says to expect on the order of 10-800 million tri/s. At the low end of that, you'd have a frame time of 3.427ms -- 292 fps. The original Playstation could do 180 000 textured polygons per second[2], so it could've managed ~5 fps. Of course, you wouldn't render that many chars at its available output resolutions anyway. :) [1] https://github.com/ctsilva/triangle-rendering-benchmarks#:~:text=Expected%20Performance%20Ranges https://github.com/ctsilva/triangle-rendering-benchmarks#:~:... [2] https://en.wikipedia.org/wiki/PlayStation_technical_specifications#:~:text=180,000%20with%20texture%20mapping https://en.wikipedia.org/wiki/PlayStation_technical_specific...
- jayd16 1y agoBut if they naively execute 15120 draw calls...
- samdoesnothing 1y agoSame texture so a single draw call probably?