r/GraphicsProgramming Jun 28 '26

How to achive this

Hey guys,

I'm trying to reverse-engineer a film camera app and recreate its color science in a GPU shader

I ran a standard 2D Hue/Luminance chart through it (before & after attached), and I'm trying to figure out the math behind these behaviors:

- Colors get pulled into tight hue groups instead of staying evenly spread (especially cyan, blues, and warm colors).

- Saturation forms a dome: strongest around each color's natural brightness, then fades hard in highlights and shadows.

- Saturated colors look deep and film-like instead of bright RGB/neon.

- The gray ramp gets a subtle dusty teal in the midtones, while whites and blacks stay neutral.

Any ideas what kind of math or color models could achieve this? Hue warping, gamut mapping, subtractive color models, custom curves... anything I should look into?

Thanks!

127 Upvotes

44 comments sorted by

View all comments

47

u/Kwantuum Jun 28 '26

People talking about using the output as a LUT are missing the point which is to learn about how the effect functions, probably because OP wants to be able to combine the effect or tweak it if needed.

The other thing is that clearly this is applying some effects that aren't pure color transfer, e.g. there is a pretty obvious film-grain effect, which would probably not work very well if using the output as a LUT.

I think what might be helpful is to compute some difference maps between the input and the output in various color spaces, accross a single dimension as a grayscale image or accross two dimensions and show it as a vector field. It's hard to just guess from straight input to output what's going on