summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core/Game.cpp18
-rw-r--r--src/core/config.h1
-rw-r--r--src/rw/RwHelper.cpp8
-rw-r--r--src/rw/RwMatFX.cpp4
4 files changed, 23 insertions, 8 deletions
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
diff --git a/src/rw/RwHelper.cpp b/src/rw/RwHelper.cpp
index bf70c8dc..08a8fca4 100644
--- a/src/rw/RwHelper.cpp
+++ b/src/rw/RwHelper.cpp
@@ -11,7 +11,11 @@
RtCharset *debugCharset;
#endif
-bool gPS2alphaTest = 1;
+#ifdef DUAL_PASS_RENDERING
+bool gPS2alphaTest = true;
+#else
+bool gPS2alphaTest = false;
+#endif
#ifndef FINAL
static bool charsetOpen;
@@ -644,4 +648,4 @@ RestoreAlphaTest()
RwD3D8SetRenderState(D3DRS_ALPHAREF, saved_alpharef);
#endif
}
-#endif
+#endif \ No newline at end of file
diff --git a/src/rw/RwMatFX.cpp b/src/rw/RwMatFX.cpp
index a128ff1a..c8384b0f 100644
--- a/src/rw/RwMatFX.cpp
+++ b/src/rw/RwMatFX.cpp
@@ -2,7 +2,6 @@
#define WITHD3D
#include "common.h"
-#include "rwcore.h"
#include "rpmatfx.h"
struct MatFXNothing { int pad[5]; int effect; };
@@ -305,7 +304,8 @@ ReplaceMatFxCallback()
{
RxD3D8AllInOneSetRenderCallBack(
RxPipelineFindNodeByName(RpMatFXGetD3D8Pipeline(rpMATFXD3D8ATOMICPIPELINE), RxNodeDefinitionGetD3D8AtomicAllInOne()->name, nil, nil),
- _rwD3D8AtomicMatFXRenderCallback);
+ _rwD3D8AtomicMatFXRenderCallback);
+
}
#endif // PS2_MATFX