Hi,
Here is what I have tried so far. I have overloaded the method Draw() of the class UGameViewportClient and selected my new class in the project settings to make sure that my new class is applied to the editor viewport.
Within my virtual void Draw(FViewport* Viewport, FCanvas* SceneCanvas) override; method, I essentially have a part that only modifies the perspective projection matrix as follows:
FSceneView* SceneView = LocalPlayer->CalcsceneView(&ViewFamily, ViewLocation, ViewRotation, LocalPlayer->ViewportClient->Viewport);
SceneView->ViewMatrices.ProjMatrix = MyOwnStaticMatrix;
And here comes the weird behaviour:
SceneView->ViewMatrices.ProjMatrix is correctly modified ONLY if I activate the Temporal AA in the project settings.
If I go either with no AA or FXAA, I then notice that SceneView->ViewMatrices.ProjMatrix is overwritten somewhere else in the engine. This is easily demonstrated by putting a breakpoint BEFORE SceneView->ViewMatrices.ProjMatrix = MyOwnStaticMatrix; and AFTER SceneView->ViewMatrices.ProjMatrix = MyOwnStaticMatrix; It clearly shows different values for SceneView->ViewMatrices.ProjMatrix.
If I go with TAA, then SceneView->ViewMatrices.ProjMatrix has the correct value BEFORE and AFTER SceneView->ViewMatrices.ProjMatrix = MyOwnStaticMatrix;
I have a bit of a hard time to understand why the overloading of Draw() only works with TAA.
Do you have any clue of a parameter somewhere in the editor which might cause this or if I’m doing something wrong here ?
If that’s a normal and expected behaviour I would like to try to understand why FXAA (or no AA !!) can’t work with my own projection matrix (I would have expected to have TAA not working actually)…
Thanks,
ThePhoenix.