hi, I rebuild unreal engine for camera “FILM offset” , I modify perspective matrix in PerspectiveMatrix.h.
the following is the code I change:
FORCEINLINE FReversedZPerspectiveMatrix::FReversedZPerspectiveMatrix(float HalfFOV, float Width, float Height, float MinZ, FVector2D shift)
: FMatrix(
FPlane(1.0f / FMath::Tan(HalfFOV), 0.0f, 0.0f, 0.0f),
FPlane(0.0f, Width / FMath::Tan(HalfFOV) / Height, 0.0f, 0.0f),
FPlane(shift.X, shift.Y, 0.0f, 1.0f),
FPlane(0.0f, 0.0f, MinZ, 0.0f)
)
{}
the “FPlane(shift.X, shift.Y, 0.0f, 1.0f),” is my modified part.
but when I try to stitch two screen(same camera but diffent shift.X), why the screen color is difference so great?