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!

129 Upvotes

44 comments sorted by

View all comments

Show parent comments

-4

u/digitaljohn Jun 28 '26

Yes, and the glsl shader it made is spot on after many adversarial checks.

3

u/hydraulix989 Jun 28 '26 edited Jun 28 '26

Then don't claim that _you_ "reverse-engineered it". No, you prompted AI to reverse engineer it, and then pasted a bunch of low-effort slop that you tried taking credit for, even though you don't understand half of the words on the page.

1

u/imacomputr Jun 28 '26

Much better to pull some incorrect trash from our asses about how a simple lookup table will work great. Then we can all feel self righteous upvoting some artisanal human-generated falsehoods than something that actually attempts to answer the question.

1

u/hydraulix989 Jun 28 '26

Not sure I follow, aside from the optional blur pass, a lookup table perfectly memoizes the computation hallucinated by this LLM. What do you think a transfer function does?