Good question. There is quite a lot of boilerplate in graphics, which is basically copy paste/book textbook lookup and ChatGPT is fantastic for this sort of thing. I wouldn't be able to deduce this, it would be a copy paste from github/stackoverflow/physics book/whatever. ChatGPT though is like a magic copy paste that takes the formula from github or the pbrt book and pastes it with my variable names. So you don't do paste and then update the names.
// convert color from linear to sRGB
let srgb = [some formula]
// calculate wavelength dependent index of refraction
let nw = [something]
But yes, obviously somewhere between this and just saying "Create all the code I need" All the fun would disappear too. For the most part, that wouldn't work either. It would shit out 200 lines of code that doesn't work, and now it instead of taking the boring job of googling a formula from an optics reference replacing the variable names, it's now taking the role of shitty developer and made me the code reviewer. But see that's my day job and it's not what anyone wants.