https://github.com/sensics/distortionizer/blob/master/shaders/undistort_shader.cpp#L94
I will refrain from passing judgement, recognizing that people are familiar with different things 😄 , just acknowledge that the code there can be made better or at least more idiomatic.
I can do it pretty quickly, if I get a chance (it's a handful of lines tops), though I'm not sure when that gets invoked so I'm not sure I'd be able to confidently say I didn't break it.
cc @russell-taylor