summaryrefslogtreecommitdiffstats
path: root/src/extras/custompipes_gl.cpp
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2021-01-12 14:07:24 +0100
committeraap <aap@papnet.eu>2021-01-12 14:07:24 +0100
commit55320a03f14c473b0fff89585713d2ebd8feb92a (patch)
tree8f64328d62a3e9586f20e72928dc720db4400fc4 /src/extras/custompipes_gl.cpp
parentmobile vehicle rendering (diff)
downloadre3-55320a03f14c473b0fff89585713d2ebd8feb92a.tar
re3-55320a03f14c473b0fff89585713d2ebd8feb92a.tar.gz
re3-55320a03f14c473b0fff89585713d2ebd8feb92a.tar.bz2
re3-55320a03f14c473b0fff89585713d2ebd8feb92a.tar.lz
re3-55320a03f14c473b0fff89585713d2ebd8feb92a.tar.xz
re3-55320a03f14c473b0fff89585713d2ebd8feb92a.tar.zst
re3-55320a03f14c473b0fff89585713d2ebd8feb92a.zip
Diffstat (limited to 'src/extras/custompipes_gl.cpp')
-rw-r--r--src/extras/custompipes_gl.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/extras/custompipes_gl.cpp b/src/extras/custompipes_gl.cpp
index 35a30316..eeb62b8d 100644
--- a/src/extras/custompipes_gl.cpp
+++ b/src/extras/custompipes_gl.cpp
@@ -122,7 +122,7 @@ leedsVehicleRenderCB(rw::Atomic *atomic, rw::gl3::InstanceDataHeader *header)
InstanceData *inst = header->inst;
rw::int32 n = header->numMeshes;
- if(bChromeCheat)
+ if(gGlassCarsCheat)
leedsVehicleShader_blend->use();
else
leedsVehicleShader_add->use();
@@ -138,10 +138,11 @@ leedsVehicleRenderCB(rw::Atomic *atomic, rw::gl3::InstanceDataHeader *header)
rw::SetRenderState(VERTEXALPHA, inst->vertexAlpha || m->color.alpha != 0xFF);
float coef = 0.0f;
- if(RpMatFXMaterialGetEffects(m) == rpMATFXEFFECTENVMAP)
+ if(RpMatFXMaterialGetEffects(m) == rpMATFXEFFECTENVMAP){
coef = CClock::ms_EnvMapTimeMultiplicator * RpMatFXMaterialGetEnvMapCoefficient(m)*0.5f;
- if(bChromeCheat && coef > 0.0f)
- coef = 1.0f;
+ if(gGlassCarsCheat)
+ coef = 1.0f;
+ }
glUniform1f(U(u_fxparams), coef);
setMaterial(m->color, m->surfaceProps);
@@ -216,7 +217,7 @@ leedsVehicleRenderCB_mobile(rw::Atomic *atomic, rw::gl3::InstanceDataHeader *hea
float coef = 0.0f;
if(RpMatFXMaterialGetEffects(m) == rpMATFXEFFECTENVMAP){
coef = CClock::ms_EnvMapTimeMultiplicator * RpMatFXMaterialGetEnvMapCoefficient(m)*0.5f;
- if(bChromeCheat)
+ if(gGlassCarsCheat)
coef = 1.0f;
}
glUniform1f(U(u_fxparams), coef);