Based on my research so far, I have concluded that OpenGL does support displaying 30 bit (10 bpc) content assuming the underlying hardware/drivers are in place. I have been less successful in determining whether WebGL will in fact support 30 bit displays. Perhaps this question is more suited for a general WebGL forum but since I am using Three.js for my application, I thought I should start here in case it is a matter of WebGL supporting 30 bit displays but Three.js not yet enabling that capability.
In my application I am already passing in 16 bit grayscale textures (packed into 2 channels of an RGB texture) to my fragment shader and generating the appropriate normalized gl_FragColor values based on the bit depth of the input texture. Do I need to do anything else in my WebGL pipeline to enable this content to be displayed at > 8 bpc or does WebGL not yet support this capability or is it dependent on which browser is being used or … ???
The only mention that I recall about supporting 30-bit color data is this really old one from Khronos group in 2012, but it looks like a conclusion was not reached.
I don’t think it’s supported, but I presume that if your system could handle it, you could visit http://webglreport.com/ (which is Three.js agnostic), and see what it says under “Framebuffer: RGBA Bits”. I honestly have never seen anything higher than [8, 8, 8, 8]
1 Like
I’m assuming from this that say Chrome, already knows how to deal with 30 bit color. How does this apply to web sites? What benefits from the 2 extra bits?
The benefit would be that instead of 256 possible values per channel, you’d get 1024 values per channel. I guess it’s good if you’re experiencing banding when your gradients are really subtle, but the use-case for WebGL is so small that it would make implementation impractical. Not worth the effort and bandwidth consumption for such a subtle improvement, in my opinion.
While I agree that the differences can be subtle, in my particular use-case, medical imaging, those subtle differences can be important. Most medical images are typically 10-16 bits per channel (grayscale) and a number of medical grade monitors are 10 bit grayscale (or 30 bit color) and in fact more consumer monitors these days are supporting 30 bit color (the new iMac’s for example). Given that OpenGL does support providing 30 bit content, I was just hoping that WebGL would follow suit as well (obviously this would likely be very browser dependent). Anyway, it sounds like you have answered my question … which is that WebGL currently does not support 30 bit monitors (asides from providing them with 24 bit content).
2 Likes