SkillAgentSearch skills...

OnePassSubsampling

Unity example: Single pass chroma subsampling shader

Install / Use

/learn @keijiro/OnePassSubsampling
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

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)

image

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

image

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.

image

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

View on GitHub
GitHub Stars21
CategoryDevelopment
Updated7mo ago
Forks3

Languages

GLSL

Security Score

67/100

Audited on Aug 28, 2025

No findings