Dual pass rendering for RW 3.3

This commit is contained in:
Sergeanur 2020-07-29 15:24:42 +03:00
parent 581cb5edfa
commit 6b92e9e12b
4 changed files with 23 additions and 8 deletions

View file

@ -149,9 +149,14 @@ CGame::InitialiseOnceBeforeRW(void)
return true; return true;
} }
#if !defined(LIBRW) && defined(PS2_MATFX) #ifndef LIBRW
#ifdef PS2_MATFX
void ReplaceMatFxCallback(); void ReplaceMatFxCallback();
#endif #endif // PS2_MATFX
#ifdef DUAL_PASS_RENDERING
void ReplaceAtomicPipeCallback();
#endif // DUAL_PASS_RENDERING
#endif // !LIBRW
bool bool
CGame::InitialiseRenderWare(void) CGame::InitialiseRenderWare(void)
@ -203,9 +208,14 @@ CGame::InitialiseRenderWare(void)
#else #else
rw::MatFX::modulateEnvMap = false; rw::MatFX::modulateEnvMap = false;
#endif #endif
#elif defined(PS2_MATFX) #else
#ifdef PS2_MATFX
ReplaceMatFxCallback(); ReplaceMatFxCallback();
#endif #endif // PS2_MATFX
#ifdef DUAL_PASS_RENDERING
ReplaceAtomicPipeCallback();
#endif // DUAL_PASS_RENDERING
#endif // LIBRW
CFont::Initialise(); CFont::Initialise();
CHud::Initialise(); CHud::Initialise();

View file

@ -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 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 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 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 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 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 //#define NO_ISLAND_LOADING // disable loadscreen between islands via loading all island data at once, consumes more memory and CPU

View file

@ -11,7 +11,11 @@
RtCharset *debugCharset; RtCharset *debugCharset;
#endif #endif
bool gPS2alphaTest = 1; #ifdef DUAL_PASS_RENDERING
bool gPS2alphaTest = true;
#else
bool gPS2alphaTest = false;
#endif
#ifndef FINAL #ifndef FINAL
static bool charsetOpen; static bool charsetOpen;

View file

@ -2,7 +2,6 @@
#define WITHD3D #define WITHD3D
#include "common.h" #include "common.h"
#include "rwcore.h"
#include "rpmatfx.h" #include "rpmatfx.h"
struct MatFXNothing { int pad[5]; int effect; }; struct MatFXNothing { int pad[5]; int effect; };
@ -305,7 +304,8 @@ ReplaceMatFxCallback()
{ {
RxD3D8AllInOneSetRenderCallBack( RxD3D8AllInOneSetRenderCallBack(
RxPipelineFindNodeByName(RpMatFXGetD3D8Pipeline(rpMATFXD3D8ATOMICPIPELINE), RxNodeDefinitionGetD3D8AtomicAllInOne()->name, nil, nil), RxPipelineFindNodeByName(RpMatFXGetD3D8Pipeline(rpMATFXD3D8ATOMICPIPELINE), RxNodeDefinitionGetD3D8AtomicAllInOne()->name, nil, nil),
_rwD3D8AtomicMatFXRenderCallback); _rwD3D8AtomicMatFXRenderCallback);
} }
#endif // PS2_MATFX #endif // PS2_MATFX