hlslpp icon indicating copy to clipboard operation
hlslpp copied to clipboard

Fast affine inverse support

Open bransay opened this issue 3 years ago • 3 comments

There are lots of cases in animation require computing the inverse of affine matrices, there are many assumptions that one can make when a 4x4 matrix is an affine transformation, any chance something like that would be considered?

(p.s. this is Bryan from PG ;))

bransay avatar Mar 06 '21 15:03 bransay

Hey Bryan it's good to hear from you, hope it's going well crafting mines :)

Of course there is scope for such functionality, something like inverse_affine would fit right in (I mean even the regular inverse isn't part of hlsl), I don't know when I'll get to it or whether you wanted to contribute it, I'll leave this open either way. I'll be happy to accept a PR or get on it as soon as I have a chance.

redorav avatar Mar 06 '21 21:03 redorav

nice, i might try my hand at it at some point :)

bransay avatar Mar 06 '21 21:03 bransay

I have an implementation of this in my shoddy matrix class https://github.com/Devsh-Graphics-Programming/Nabla/blob/6dc8448ba5e5cef21b7eecc52038b389b8dc96a1/include/matrix3x4SIMD_impl.h#L318