Hacker News new | ask | show | jobs
by ryandrake 409 days ago
Maybe I'm still living in the 1990s, but isn't the graphics API call to paint a solid 2D rectangle infinitely faster than the call to blt a 2D image to the screen, with possible arbitrary scaling and clipping? Or is everything just natively textures now and we don't even have 2D drawing hardware?
1 comments

The second.
No, not really. Everything is just rasterized triangles now, but whether they're textured or not is up to the shader your using.

A non-textured triangle will be faster than a textured one as it can just return a literal in the pixel shader instead of wasting time sampling a texture for each pixel.

However a single texture sample is so cheap on modern hardware that a specialized path for solid colors wouldn't be worth the complexity in a 2D setting. It's fast enough.