boolean for extended pipelines

This commit is contained in:
aap 2020-10-27 15:55:07 +01:00
parent 4cfb3b0984
commit 78ac22ee2c
5 changed files with 47 additions and 3 deletions

View File

@ -849,9 +849,12 @@ DebugMenuPopulate(void)
DebugMenuEntrySetWrap(e, true); DebugMenuEntrySetWrap(e, true);
DebugMenuAddVar("Render", "Neo Vehicle Shininess", &CustomPipes::VehicleShininess, nil, 0.1f, 0, 1.0f); DebugMenuAddVar("Render", "Neo Vehicle Shininess", &CustomPipes::VehicleShininess, nil, 0.1f, 0, 1.0f);
DebugMenuAddVar("Render", "Neo Vehicle Specularity", &CustomPipes::VehicleSpecularity, nil, 0.1f, 0, 1.0f); DebugMenuAddVar("Render", "Neo Vehicle Specularity", &CustomPipes::VehicleSpecularity, nil, 0.1f, 0, 1.0f);
DebugMenuAddVar("Render", "Neo Ped Rim light", &CustomPipes::RimlightMult, nil, 0.1f, 0, 1.0f); DebugMenuAddVarBool8("Render", "Neo Ped Rim light enable", &CustomPipes::RimlightEnable, nil);
DebugMenuAddVar("Render", "Neo World Lightmaps", &CustomPipes::LightmapMult, nil, 0.1f, 0, 1.0f); DebugMenuAddVar("Render", "Mult", &CustomPipes::RimlightMult, nil, 0.1f, 0, 1.0f);
DebugMenuAddVar("Render", "Neo Road Gloss", &CustomPipes::GlossMult, nil, 0.1f, 0, 1.0f); DebugMenuAddVarBool8("Render", "Neo World Lightmaps enable", &CustomPipes::LightmapEnable, nil);
DebugMenuAddVar("Render", "Mult", &CustomPipes::LightmapMult, nil, 0.1f, 0, 1.0f);
DebugMenuAddVarBool8("Render", "Neo Road Gloss enable", &CustomPipes::GlossEnable, nil);
DebugMenuAddVar("Render", "Mult", &CustomPipes::GlossMult, nil, 0.1f, 0, 1.0f);
#endif #endif
DebugMenuAddVarBool8("Render", "Show Ped Paths", &gbShowPedPaths, nil); DebugMenuAddVarBool8("Render", "Show Ped Paths", &gbShowPedPaths, nil);
DebugMenuAddVarBool8("Render", "Show Car Paths", &gbShowCarPaths, nil); DebugMenuAddVarBool8("Render", "Show Car Paths", &gbShowCarPaths, nil);

View File

@ -365,6 +365,7 @@ AttachVehiclePipe(rw::Clump *clump)
* Neo World pipe * Neo World pipe
*/ */
bool LightmapEnable;
float LightmapMult = 1.0f; float LightmapMult = 1.0f;
InterpolatedFloat WorldLightmapBlend(1.0f); InterpolatedFloat WorldLightmapBlend(1.0f);
rw::ObjPipeline *worldPipe; rw::ObjPipeline *worldPipe;
@ -389,6 +390,7 @@ AttachWorldPipe(rw::Clump *clump)
* Neo Gloss pipe * Neo Gloss pipe
*/ */
bool GlossEnable;
float GlossMult = 1.0f; float GlossMult = 1.0f;
rw::ObjPipeline *glossPipe; rw::ObjPipeline *glossPipe;
@ -427,6 +429,7 @@ AttachGlossPipe(rw::Clump *clump)
* Neo Rim pipes * Neo Rim pipes
*/ */
bool RimlightEnable;
float RimlightMult = 1.0f; float RimlightMult = 1.0f;
InterpolatedColor RampStart(Color(0.0f, 0.0f, 0.0f, 1.0f)); InterpolatedColor RampStart(Color(0.0f, 0.0f, 0.0f, 1.0f));
InterpolatedColor RampEnd(Color(1.0f, 1.0f, 1.0f, 1.0f)); InterpolatedColor RampEnd(Color(1.0f, 1.0f, 1.0f, 1.0f));

View File

@ -98,6 +98,7 @@ void DestroyVehiclePipe(void);
void AttachVehiclePipe(rw::Atomic *atomic); void AttachVehiclePipe(rw::Atomic *atomic);
void AttachVehiclePipe(rw::Clump *clump); void AttachVehiclePipe(rw::Clump *clump);
extern bool LightmapEnable;
extern float LightmapMult; extern float LightmapMult;
extern InterpolatedFloat WorldLightmapBlend; extern InterpolatedFloat WorldLightmapBlend;
extern rw::ObjPipeline *worldPipe; extern rw::ObjPipeline *worldPipe;
@ -106,6 +107,7 @@ void DestroyWorldPipe(void);
void AttachWorldPipe(rw::Atomic *atomic); void AttachWorldPipe(rw::Atomic *atomic);
void AttachWorldPipe(rw::Clump *clump); void AttachWorldPipe(rw::Clump *clump);
extern bool GlossEnable;
extern float GlossMult; extern float GlossMult;
extern rw::ObjPipeline *glossPipe; extern rw::ObjPipeline *glossPipe;
void CreateGlossPipe(void); void CreateGlossPipe(void);
@ -114,6 +116,7 @@ void AttachGlossPipe(rw::Atomic *atomic);
void AttachGlossPipe(rw::Clump *clump); void AttachGlossPipe(rw::Clump *clump);
rw::Texture *GetGlossTex(rw::Material *mat); rw::Texture *GetGlossTex(rw::Material *mat);
extern bool RimlightEnable;
extern float RimlightMult; extern float RimlightMult;
extern InterpolatedColor RampStart; extern InterpolatedColor RampStart;
extern InterpolatedColor RampEnd; extern InterpolatedColor RampEnd;

View File

@ -190,6 +190,11 @@ worldRenderCB(rw::Atomic *atomic, rw::d3d9::InstanceDataHeader *header)
using namespace rw::d3d; using namespace rw::d3d;
using namespace rw::d3d9; using namespace rw::d3d9;
if(!LightmapEnable){
defaultRenderCB_Shader(atomic, header);
return;
}
int vsBits; int vsBits;
setStreamSource(0, header->vertexStream[0].vertexBuffer, 0, header->vertexStream[0].stride); setStreamSource(0, header->vertexStream[0].vertexBuffer, 0, header->vertexStream[0].stride);
setIndices(header->indexBuffer); setIndices(header->indexBuffer);
@ -297,6 +302,9 @@ glossRenderCB(rw::Atomic *atomic, rw::d3d9::InstanceDataHeader *header)
using namespace rw::d3d; using namespace rw::d3d;
using namespace rw::d3d9; using namespace rw::d3d9;
if(!GlossEnable)
return;
setVertexShader(neoGloss_VS); setVertexShader(neoGloss_VS);
setPixelShader(neoGloss_PS); setPixelShader(neoGloss_PS);
@ -395,6 +403,11 @@ rimRenderCB(rw::Atomic *atomic, rw::d3d9::InstanceDataHeader *header)
using namespace rw::d3d; using namespace rw::d3d;
using namespace rw::d3d9; using namespace rw::d3d9;
if(!RimlightEnable){
defaultRenderCB_Shader(atomic, header);
return;
}
int vsBits; int vsBits;
setStreamSource(0, header->vertexStream[0].vertexBuffer, 0, header->vertexStream[0].stride); setStreamSource(0, header->vertexStream[0].vertexBuffer, 0, header->vertexStream[0].stride);
setIndices(header->indexBuffer); setIndices(header->indexBuffer);
@ -433,6 +446,11 @@ rimSkinRenderCB(rw::Atomic *atomic, rw::d3d9::InstanceDataHeader *header)
using namespace rw::d3d; using namespace rw::d3d;
using namespace rw::d3d9; using namespace rw::d3d9;
if(!RimlightEnable){
rimSkinRenderCB(atomic, header);
return;
}
int vsBits; int vsBits;
setStreamSource(0, (IDirect3DVertexBuffer9*)header->vertexStream[0].vertexBuffer, setStreamSource(0, (IDirect3DVertexBuffer9*)header->vertexStream[0].vertexBuffer,

View File

@ -203,6 +203,11 @@ worldRenderCB(rw::Atomic *atomic, rw::gl3::InstanceDataHeader *header)
using namespace rw; using namespace rw;
using namespace rw::gl3; using namespace rw::gl3;
if(!LightmapEnable){
gl3::defaultRenderCB(atomic, header);
return;
}
Material *m; Material *m;
setWorldMatrix(atomic->getFrame()->getLTM()); setWorldMatrix(atomic->getFrame()->getLTM());
@ -315,6 +320,8 @@ glossRenderCB(rw::Atomic *atomic, rw::gl3::InstanceDataHeader *header)
using namespace rw::gl3; using namespace rw::gl3;
worldRenderCB(atomic, header); worldRenderCB(atomic, header);
if(!GlossEnable)
return;
Material *m; Material *m;
@ -442,6 +449,11 @@ rimSkinRenderCB(rw::Atomic *atomic, rw::gl3::InstanceDataHeader *header)
using namespace rw; using namespace rw;
using namespace rw::gl3; using namespace rw::gl3;
if(!RimlightEnable){
gl3::skinRenderCB(atomic, header);
return;
}
Material *m; Material *m;
setWorldMatrix(atomic->getFrame()->getLTM()); setWorldMatrix(atomic->getFrame()->getLTM());
@ -487,6 +499,11 @@ rimRenderCB(rw::Atomic *atomic, rw::gl3::InstanceDataHeader *header)
using namespace rw; using namespace rw;
using namespace rw::gl3; using namespace rw::gl3;
if(!RimlightEnable){
gl3::defaultRenderCB(atomic, header);
return;
}
Material *m; Material *m;
setWorldMatrix(atomic->getFrame()->getLTM()); setWorldMatrix(atomic->getFrame()->getLTM());