There is no inverse command in glsl es 2.0
But I saw that I can 1.0/mat2 . But I fear it'll just divide component wisely. Or not?
But if so, is there some trick for this (get 1/det fast)?
No, there's no matrix inverse function in GLSL ES 1.00 (used in OpenGL ES 2.0). You'll need to do it manually, take a look e.g. here. But you should think hard whether you really need to do it in the shader on a per-vertex or per-fragment basis every frame, or is it possible to be precomputed and passed in as uniform.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With