Skip to content
arvinmoses edited this page Feb 4, 2025 · 5 revisions

Welcome to the ShaderShare wiki!

I'm just quickly writing out math for things I think would be useful. Will eventually push to pages, and then actual code

Remappers

Tools to remap values to another.

Remap to Range

low2 + (value - low1) * (high2 - low2) / (high1 - low1)

Remap 0 to 1

input - low1 / high1 - low1

YUV

Color Transforms

Y' = ((Y - 16) x C) + B + 16

U'' = (((U-128) x Cos(H) + (V-128) x Sin(H)) x C x S) + 128

V'' = (((V-128) x Cos(H) - (U-128) x Sin(H)) x C x S) + 128

Clone this wiki locally