From 9ed1fbe40fe90afd24f04ca2ee210255985ed840 Mon Sep 17 00:00:00 2001 From: Jack Andersen Date: Fri, 1 Apr 2016 18:25:47 -1000 Subject: [PATCH] Fix other perspective matrix function --- Runtime/Graphics/CGraphics.cpp | 4 ++-- hecl | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Runtime/Graphics/CGraphics.cpp b/Runtime/Graphics/CGraphics.cpp index 8cc43e537..40858183f 100644 --- a/Runtime/Graphics/CGraphics.cpp +++ b/Runtime/Graphics/CGraphics.cpp @@ -147,11 +147,11 @@ zeus::CMatrix4f CGraphics::CalculatePerspectiveMatrix(float fovy, float aspect, float rpl = st.x8_right + st.x4_left; float tmb = st.xc_top - st.x10_bottom; float tpb = st.xc_top + st.x10_bottom; - float fmn = st.x18_far - st.x14_near; + float nmf = g_Proj.x14_near - g_Proj.x18_far; float fpn = st.x18_far + st.x14_near; return zeus::CMatrix4f(2.f * st.x14_near / rml, 0.f, rpl / rml, 0.f, 0.f, 2.f * st.x14_near / tmb, tpb / tmb, 0.f, - 0.f, 0.f, -fpn / fmn, -2.f * st.x18_far * st.x14_near / fmn, + 0.f, 0.f, fpn / nmf, 2.f * st.x18_far * st.x14_near / nmf, 0.f, 0.f, -1.f, 0.f); } diff --git a/hecl b/hecl index c07f5499d..1dd20237e 160000 --- a/hecl +++ b/hecl @@ -1 +1 @@ -Subproject commit c07f5499d0ee670bef971e3b0081fa9e771bc3a8 +Subproject commit 1dd20237e8a42c3d04b2069cadb0d58513f60836