3 ms·
The number of bytes of memory available on GPUs is hardly the biggest issue when considering rendering at more than 8 bits per channel of color precision. Even
by kevingadd 14y ago
The number of bytes of memory available on GPUs is hardly the biggest issue when considering rendering at more than 8 bits per channel of color precision. Even producing a 30-bit framebuffer (as has been supported for a while on many desktop GPUs) comes at a performance penalty and is incompatible with many pieces of software and hardware. Modern GPUs actually allow 16 bits per channel of precision when rendering, but it comes at a significant cost - various features no longer function, memory bandwidth is devoured, etc. You can't simply say 'we can spare the bits' and wave away all the technological challenges here, especially when the advantage gained from all those costs is comparatively miniscule.
To be fair, this sort of applies to retina displays as well: The hardware put into some of the Retina macs can barely handle the bandwidth demands of realtime rendering at such high resolutions. Until that problem is addressed, you certainly shouldn't be running around demanding >8bpc color precision.
Dithering for gradients could certainly make a minor difference in rendered quality, but I don't think most browser vendors are interested in making rendering performance slower right now - they're quite busy trying to make it faster. As evidenced by the fact that the OP's site runs like complete garbage in even modern browsers. Even if you spend the cycles and the power to dither, you're basically approximating something like another bit of precision. Is it really worth the cost just for another bit? You could support the argument for dithering by showing a side by side comparison, at least.
- mrb 14y agoActually dithering makes a huge difference. I see zero banding whatsoever in the examples posted in this thread, because my sw/hw config does automatic dithering (Xorg fbdev 0.4.2, AMD Fusion E-350 GPU, Lenovo X120e laptop). Contrast this with other posters who I presume don't have dithering, and write comments like "this gradient looks ugly"...
- makomk 14y agoAs far as I know, most modern PC GPUs actually use a 32-bit framebuffer with 8 bits of padding for their 24-bit colour mode and do all shader computations in floating point already, so 30-bit colour isn't going to use any more memory bandwidth or shader time.
- kevingadd 14y agoDoing 4 8-bit computations in parallel is different from doing 3 10-bit computations in parallel (or two 11-bit computations and one 10-bit computation). The hardware required is different. Modern GPUs are certainly capable of high-precision arithmetic but it is not a safe assumption that all the hardware is designed for it. A lot of it is designed for the stuff it spends most of its time doing, which is 8 bits per channel rasterization.
- snprbob86 14y ago> Modern GPUs actually allow 16 bits per channel of precision when rendering, but it comes at a significant cost - various features no longer function, memory bandwidth is devoured, etc. I'm not sure that this is true. It's extremely common for games to render lighting texture maps with HDR render targets. 16 bit-per-channel render targets are often used to accumulate excess light. The excess light gets processed by successful full screen pixel shader passes. These passes generally include blurring and flattening into a normal 8-bit-per-channel texture on the swap chain. Furthermore, multiple render targets have been common since before the release of the Xbox 360. Deferred shading engines come into and out of popularity on what seems like a biyearly basis depending on what visual style is popular in games currently. It seems to me that modern hardware is quite capable of greater color range, but the most demanding applications, games, would rather use that extra video RAM and fill rate for storing and processing surface normals, lighting scalars, material properties, etc. Desktop applications always lag behind games dramatically. Hell, browsers are just now starting to see some of the benefits of modern GPUs.
- kevingadd 14y ago>8bpc render targets have limited feature sets, especially when talking about older architectures like the XBox 360. It's true that they're used to accumulate lighting and other information, but that's basically one of the simplest possible use cases for a render target; you're just writing pixel data. Multisampling, blending, etc - all things used often in 3D rendering - are not necessarily supported on a >8bpc render target. Whether you can do them depends on the drivers and the hardware. The same goes for textures that are >8bpc (filtering might not work, for example). I ran into this problem just yesterday in a program I was writing when I tried to do blending on a high precision render target. :)
- bhauer 14y agoYou're right. I trivialize the challenges, and I admit that. However, my point is that it has been some fifteen years since 24-bit "True Color" arrived. Certainly since then we've increased computing performance to the point where we can manage to throw a few more bits around, yes? Also, you're right that browser vendors are dutifully concerned about performance. In fact, one of the reasons I enjoyed adding a subtly animated background (see previous reply apologizing to those who hate it) was a bit of evidence to back up another point I've made elsewhere: in 2012 our computers that process billions of CPU operations per second paired with high-powered GPUs can still get chunky with relatively trivial 2D animation in a web browser. Incidentally, on that point, if you happen to have IE 10, check out how well it uses your GPU to do CSS transitions. It doesn't do the SVG/SMIL animation used in the background, but I find it fascinating how effortless it executes the animation it does support: http://tiamat.tsotech.com/ie-10-is-no-joke http://tiamat.tsotech.com/ie-10-is-no-joke I'd really like to see Chrome and Firefox catch up with that degree of GPU acceleration. But in this particular blog entry, I'm asking that some attention return to rendering quality. I'd love to see color banding in gradients disappear soon.