[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Public WebGL] Premultiplied alpha blending and issues with color accuracy
- In addition to this, I have been experimenting with gamma. Linear gamma, x^(1/2.2), would provide perfect color mixing even with RGB, but this makes dark grays look like absolute s**t at 8 bits per channel. I then tried a gamma of 1.8, x^(1.8/2.2), the one used by old Apple machines. The RCT color mixing was already good, but this took it up another notch, while still rendering dark shades of gray without banding. I have yet to add the linear section specified in sRGB. 2.2 is an adequate approximation for the time being.
WebGL still needs an sRGB blending extension; this would allow you to work with linear color values without the banding/precision loss you describe, or having to resort to float16 render targets. This has been solved in desktop GL / D3D / consoles for many years now. WebGL will come around soon, I hope :)