OnePassSubsampling
Unity example: Single pass chroma subsampling shader
Install / Use
/learn @keijiro/OnePassSubsamplingREADME
OnePassSubsampling
This is an example of single-pass chroma subsampling shader for Unity.
Chroma subsampling is a lossy compression technique that reduces image data size by cutting down the number of chrominance samples. This shader converts a RGB source image into two R8 (8 bits per pixel) textures with the 4:2:2 YCbCr scheme.
Original image (32 bits per pixel)

4:2:2 encoded image (16 bits per pixel)

The differences are not noticeable at a glance, but if you look into it very carefully, you may find some color banding in the dark area and ringing artifacts on the red sphere.

This shader uses MRT (multiple render targets) to output luma and chrominance in a single pass, and thus requires MRT support on the platform.
