79457954

Date: 2025-02-21 16:02:28
Score: 0.5
Natty:
Report link

I soved it by trying out dx 11 samples link it helped to say that when i created the orthographic camera i switched x and y values for my clip space which i even forgot to attach

void Camera::Init(float left, float right, float bottom, float top, float nearPlane, float farPlane)
{
    mySettings.myUsePerspective = false;
    myInverse = myTransform.GetMatrix().GetFastInverse();

    myClipSpace(1, 1) = 2.0f / (right - left);
    myClipSpace(2, 2) = 2.0f / (top - bottom);
    myClipSpace(3, 3) = 1.0f / (farPlane - nearPlane);
    myClipSpace(4, 4) = 1.0f;
    myClipSpace(4, 1) = -(right + left) / (right - left);
    myClipSpace(4, 2) = -(top + bottom) / (top - bottom);
    myClipSpace(4, 3) = -nearPlane / (farPlane - nearPlane);
}
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Simon Henriksson