From df4ce272407178e41b389722f3fa248b3abca4d1 Mon Sep 17 00:00:00 2001 From: Jack Andersen Date: Fri, 29 Jul 2016 18:48:02 -1000 Subject: [PATCH] Preserve proportions for non-square warps --- Runtime/Graphics/Shaders/CSpaceWarpFilter.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Runtime/Graphics/Shaders/CSpaceWarpFilter.cpp b/Runtime/Graphics/Shaders/CSpaceWarpFilter.cpp index 2cec19c27..15f29a581 100644 --- a/Runtime/Graphics/Shaders/CSpaceWarpFilter.cpp +++ b/Runtime/Graphics/Shaders/CSpaceWarpFilter.cpp @@ -125,8 +125,8 @@ void CSpaceWarpFilter::draw(const zeus::CVector2f& pt) clipRect.x10_height += 1; CGraphics::ResolveSpareTexture(clipRect); - - m_uniform.m_strength.x = m_uniform.m_matrix[0][0] * m_strength * 0.5f; + m_uniform.m_strength.x = m_uniform.m_matrix[0][0] * m_strength * 0.5f * + (clipRect.x10_height / float(clipRect.xc_width)); m_uniform.m_strength.y = m_uniform.m_matrix[1][1] * m_strength * 0.5f; m_uniBuf->load(&m_uniform, sizeof(m_uniform));