I spent a substantial part of my Ph.D. dealing with this stuff, existing frameworks and algorithms were not suitable for our exact use-case and implementation. I had more bugs/artefacts than I'd like to admit due to some off-by-less-than-0.5 in some particular direction in some particular frame...