- Home /
Compressing Viewport Output Color Range
Normally, the RGB channels in the viewport output would range from 0 to 1 (000000-FFFFFF). Let's say I want to achieve a "chroma key" effect in another application by treating every pure-black (000000) pixel as "transparent". I need a way to "intercept" the rendering pixel-by-pixel (by a shader I assume) so that any incoming "000000" pixel is changed to (for example) "010101" before being written to the render buffer, so that it is impossible for a "000000" pixel to end up in my final rendered window except by the initial clear of the viewport buffer. The extremely slight "greying" of pure black by changing 000000 to 010101 is fine for my situation.
Comment