From 6b92e9e12b376b9edf04070ecf83179e9a0f8fda Mon Sep 17 00:00:00 2001 From: Sergeanur Date: Wed, 29 Jul 2020 15:24:42 +0300 Subject: Dual pass rendering for RW 3.3 --- src/core/Game.cpp | 18 ++++++++++++++---- src/core/config.h | 1 + 2 files changed, 15 insertions(+), 4 deletions(-) (limited to 'src/core') diff --git a/src/core/Game.cpp b/src/core/Game.cpp index 0d839dfa..2c9e784c 100644 --- a/src/core/Game.cpp +++ b/src/core/Game.cpp @@ -149,9 +149,14 @@ CGame::InitialiseOnceBeforeRW(void) return true; } -#if !defined(LIBRW) && defined(PS2_MATFX) +#ifndef LIBRW +#ifdef PS2_MATFX void ReplaceMatFxCallback(); -#endif +#endif // PS2_MATFX +#ifdef DUAL_PASS_RENDERING +void ReplaceAtomicPipeCallback(); +#endif // DUAL_PASS_RENDERING +#endif // !LIBRW bool CGame::InitialiseRenderWare(void) @@ -203,9 +208,14 @@ CGame::InitialiseRenderWare(void) #else rw::MatFX::modulateEnvMap = false; #endif -#elif defined(PS2_MATFX) +#else +#ifdef PS2_MATFX ReplaceMatFxCallback(); -#endif +#endif // PS2_MATFX +#ifdef DUAL_PASS_RENDERING + ReplaceAtomicPipeCallback(); +#endif // DUAL_PASS_RENDERING +#endif // LIBRW CFont::Initialise(); CHud::Initialise(); diff --git a/src/core/config.h b/src/core/config.h index 8972e7b7..9dfbad03 100644 --- a/src/core/config.h +++ b/src/core/config.h @@ -198,6 +198,7 @@ enum Config { #define ASPECT_RATIO_SCALE // Not just makes everything scale with aspect ratio, also adds support for all aspect ratios #define DEFAULT_NATIVE_RESOLUTION // Set default video mode to your native resolution (fixes Windows 10 launch) #define USE_TXD_CDIMAGE // generate and load textures from txd.img +#define DUAL_PASS_RENDERING // dual pass rendering from SkyGfx #define IMPROVED_VIDEOMODE // save and load videomode parameters instead of a magic number #define DISABLE_LOADING_SCREEN // disable the loading screen which vastly improves the loading time //#define NO_ISLAND_LOADING // disable loadscreen between islands via loading all island data at once, consumes more memory and CPU -- cgit v1.2.3