summaryrefslogtreecommitdiffstats
path: root/src/extras
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2020-10-27 15:55:07 +0100
committeraap <aap@papnet.eu>2020-10-27 15:55:07 +0100
commit78ac22ee2cfa12c1e8c93cca956f1aa1f93c76dc (patch)
tree527d1c6df8744f16662d9fdf24be47dcd15584b1 /src/extras
parentOpenAL channels now use their own sound buffers (diff)
downloadre3-78ac22ee2cfa12c1e8c93cca956f1aa1f93c76dc.tar
re3-78ac22ee2cfa12c1e8c93cca956f1aa1f93c76dc.tar.gz
re3-78ac22ee2cfa12c1e8c93cca956f1aa1f93c76dc.tar.bz2
re3-78ac22ee2cfa12c1e8c93cca956f1aa1f93c76dc.tar.lz
re3-78ac22ee2cfa12c1e8c93cca956f1aa1f93c76dc.tar.xz
re3-78ac22ee2cfa12c1e8c93cca956f1aa1f93c76dc.tar.zst
re3-78ac22ee2cfa12c1e8c93cca956f1aa1f93c76dc.zip
Diffstat (limited to '')
-rw-r--r--src/extras/custompipes.cpp3
-rw-r--r--src/extras/custompipes.h3
-rw-r--r--src/extras/custompipes_d3d9.cpp18
-rw-r--r--src/extras/custompipes_gl.cpp17
4 files changed, 41 insertions, 0 deletions
diff --git a/src/extras/custompipes.cpp b/src/extras/custompipes.cpp
index 79254eb4..b545b4d8 100644
--- a/src/extras/custompipes.cpp
+++ b/src/extras/custompipes.cpp
@@ -365,6 +365,7 @@ AttachVehiclePipe(rw::Clump *clump)
* Neo World pipe
*/
+bool LightmapEnable;
float LightmapMult = 1.0f;
InterpolatedFloat WorldLightmapBlend(1.0f);
rw::ObjPipeline *worldPipe;
@@ -389,6 +390,7 @@ AttachWorldPipe(rw::Clump *clump)
* Neo Gloss pipe
*/
+bool GlossEnable;
float GlossMult = 1.0f;
rw::ObjPipeline *glossPipe;
@@ -427,6 +429,7 @@ AttachGlossPipe(rw::Clump *clump)
* Neo Rim pipes
*/
+bool RimlightEnable;
float RimlightMult = 1.0f;
InterpolatedColor RampStart(Color(0.0f, 0.0f, 0.0f, 1.0f));
InterpolatedColor RampEnd(Color(1.0f, 1.0f, 1.0f, 1.0f));
diff --git a/src/extras/custompipes.h b/src/extras/custompipes.h
index 4ebe586f..6e9c6517 100644
--- a/src/extras/custompipes.h
+++ b/src/extras/custompipes.h
@@ -98,6 +98,7 @@ void DestroyVehiclePipe(void);
void AttachVehiclePipe(rw::Atomic *atomic);
void AttachVehiclePipe(rw::Clump *clump);
+extern bool LightmapEnable;
extern float LightmapMult;
extern InterpolatedFloat WorldLightmapBlend;
extern rw::ObjPipeline *worldPipe;
@@ -106,6 +107,7 @@ void DestroyWorldPipe(void);
void AttachWorldPipe(rw::Atomic *atomic);
void AttachWorldPipe(rw::Clump *clump);
+extern bool GlossEnable;
extern float GlossMult;
extern rw::ObjPipeline *glossPipe;
void CreateGlossPipe(void);
@@ -114,6 +116,7 @@ void AttachGlossPipe(rw::Atomic *atomic);
void AttachGlossPipe(rw::Clump *clump);
rw::Texture *GetGlossTex(rw::Material *mat);
+extern bool RimlightEnable;
extern float RimlightMult;
extern InterpolatedColor RampStart;
extern InterpolatedColor RampEnd;
diff --git a/src/extras/custompipes_d3d9.cpp b/src/extras/custompipes_d3d9.cpp
index bfc744a3..852f2df8 100644
--- a/src/extras/custompipes_d3d9.cpp
+++ b/src/extras/custompipes_d3d9.cpp
@@ -190,6 +190,11 @@ worldRenderCB(rw::Atomic *atomic, rw::d3d9::InstanceDataHeader *header)
using namespace rw::d3d;
using namespace rw::d3d9;
+ if(!LightmapEnable){
+ defaultRenderCB_Shader(atomic, header);
+ return;
+ }
+
int vsBits;
setStreamSource(0, header->vertexStream[0].vertexBuffer, 0, header->vertexStream[0].stride);
setIndices(header->indexBuffer);
@@ -297,6 +302,9 @@ glossRenderCB(rw::Atomic *atomic, rw::d3d9::InstanceDataHeader *header)
using namespace rw::d3d;
using namespace rw::d3d9;
+ if(!GlossEnable)
+ return;
+
setVertexShader(neoGloss_VS);
setPixelShader(neoGloss_PS);
@@ -395,6 +403,11 @@ rimRenderCB(rw::Atomic *atomic, rw::d3d9::InstanceDataHeader *header)
using namespace rw::d3d;
using namespace rw::d3d9;
+ if(!RimlightEnable){
+ defaultRenderCB_Shader(atomic, header);
+ return;
+ }
+
int vsBits;
setStreamSource(0, header->vertexStream[0].vertexBuffer, 0, header->vertexStream[0].stride);
setIndices(header->indexBuffer);
@@ -433,6 +446,11 @@ rimSkinRenderCB(rw::Atomic *atomic, rw::d3d9::InstanceDataHeader *header)
using namespace rw::d3d;
using namespace rw::d3d9;
+ if(!RimlightEnable){
+ rimSkinRenderCB(atomic, header);
+ return;
+ }
+
int vsBits;
setStreamSource(0, (IDirect3DVertexBuffer9*)header->vertexStream[0].vertexBuffer,
diff --git a/src/extras/custompipes_gl.cpp b/src/extras/custompipes_gl.cpp
index 5717c83b..01663df5 100644
--- a/src/extras/custompipes_gl.cpp
+++ b/src/extras/custompipes_gl.cpp
@@ -203,6 +203,11 @@ worldRenderCB(rw::Atomic *atomic, rw::gl3::InstanceDataHeader *header)
using namespace rw;
using namespace rw::gl3;
+ if(!LightmapEnable){
+ gl3::defaultRenderCB(atomic, header);
+ return;
+ }
+
Material *m;
setWorldMatrix(atomic->getFrame()->getLTM());
@@ -315,6 +320,8 @@ glossRenderCB(rw::Atomic *atomic, rw::gl3::InstanceDataHeader *header)
using namespace rw::gl3;
worldRenderCB(atomic, header);
+ if(!GlossEnable)
+ return;
Material *m;
@@ -442,6 +449,11 @@ rimSkinRenderCB(rw::Atomic *atomic, rw::gl3::InstanceDataHeader *header)
using namespace rw;
using namespace rw::gl3;
+ if(!RimlightEnable){
+ gl3::skinRenderCB(atomic, header);
+ return;
+ }
+
Material *m;
setWorldMatrix(atomic->getFrame()->getLTM());
@@ -487,6 +499,11 @@ rimRenderCB(rw::Atomic *atomic, rw::gl3::InstanceDataHeader *header)
using namespace rw;
using namespace rw::gl3;
+ if(!RimlightEnable){
+ gl3::defaultRenderCB(atomic, header);
+ return;
+ }
+
Material *m;
setWorldMatrix(atomic->getFrame()->getLTM());