For a few selected objects, I want to use a secondary projection matrix and bypass the main camera’s projection matrix. This means that no matter how much I change the FOV of the main camera, those few objects will retain their rendering.
I found this amazing thread Transforming vertices into orthographic view space - #3 by dokipen by @dokipen in which they actually manage to find the InvViewProj matrix. Let’s say I’m bringing in my secondary projection matrix using material parameters and making a matrix 4 from those parameters, what should I do to find the correct WPO?
I was thinking that the equation should be something like:
NWP = AbsoluteWorldPosition + WPO
NWP x ViewProjection = AbsoluteWorldPosition x View x SecondaryProjection
then in order to find the WPO we can do
AbsoluteWorldPosition x View x SecondaryProjection x InvViewProj - AbsoluteWorldPosition
But this doesn’t work sadly. Any ideas?