From 0a7e36a1fb70b8880e441f8078d0031c1e6198e0 Mon Sep 17 00:00:00 2001 From: Jack Andersen Date: Fri, 29 Jul 2016 12:57:48 -1000 Subject: [PATCH] Space warp pixel-accuracy fixes --- Editor/ViewManager.cpp | 1 + Runtime/Graphics/Shaders/CSpaceWarpFilter.cpp | 27 +++++++------------ .../Graphics/Shaders/CSpaceWarpFilterGLSL.cpp | 5 +--- 3 files changed, 12 insertions(+), 21 deletions(-) diff --git a/Editor/ViewManager.cpp b/Editor/ViewManager.cpp index 392386f27..ec22a8748 100644 --- a/Editor/ViewManager.cpp +++ b/Editor/ViewManager.cpp @@ -21,6 +21,7 @@ namespace urde { URDE_DECL_SPECIALIZE_SHADER(CThermalColdFilter) +URDE_DECL_SPECIALIZE_SHADER(CSpaceWarpFilter) void ViewManager::BuildTestPART(urde::IObjectStore& objStore) { diff --git a/Runtime/Graphics/Shaders/CSpaceWarpFilter.cpp b/Runtime/Graphics/Shaders/CSpaceWarpFilter.cpp index 1157499e5..862d0da2e 100644 --- a/Runtime/Graphics/Shaders/CSpaceWarpFilter.cpp +++ b/Runtime/Graphics/Shaders/CSpaceWarpFilter.cpp @@ -9,26 +9,26 @@ namespace urde void CSpaceWarpFilter::GenerateWarpRampTex(boo::IGraphicsDataFactory::Context& ctx) { - u8 data[WARP_RAMP_RES][WARP_RAMP_RES][4] = {}; + u8 data[WARP_RAMP_RES+1][WARP_RAMP_RES+1][4] = {}; float halfRes = WARP_RAMP_RES / 2.f; - for (int y=0 ; y