bounce lighting fix
change defaults for Q2 to look a bit closer to how it looked before
(cherry picked from commit b8bb4cdd2a)
This commit is contained in:
parent
f089c5d145
commit
0bcd92300a
|
|
@ -315,7 +315,7 @@ public:
|
|||
|
||||
/* Q2 surface lights (mxd) */
|
||||
setting_scalar surflightscale{
|
||||
this, "surflightscale", 0.3, &worldspawn_group}; // Strange defaults to match arghrad3 look...
|
||||
this, "surflightscale", 1.0, &worldspawn_group};
|
||||
setting_scalar surflightsubdivision{this, {"surflightsubdivision", "choplight"}, 16.0, 1.0, 8192.0,
|
||||
&worldspawn_group}; // "choplight" - arghrad3 name
|
||||
|
||||
|
|
|
|||
|
|
@ -1197,10 +1197,13 @@ int light_main(int argc, const char **argv)
|
|||
options.rangescale.setValue(1.0f);
|
||||
}
|
||||
if (!options.bouncecolorscale.isChanged()) {
|
||||
options.bouncecolorscale.setValue(1.0f);
|
||||
options.bouncecolorscale.setValue(0.5f);
|
||||
}
|
||||
if (!options.surflightscale.isChanged()) {
|
||||
options.surflightscale.setValue(0.65f);
|
||||
}
|
||||
if (!options.bouncescale.isChanged()) {
|
||||
options.bouncescale.setValue(1.5f);
|
||||
options.bouncescale.setValue(1.25f);
|
||||
}
|
||||
if (!options.bounce.isChanged()) {
|
||||
options.bounce.setValue(true);
|
||||
|
|
|
|||
|
|
@ -1897,18 +1897,19 @@ inline qvec3f GetSurfaceLighting(const settings::worldspawn_keys &cfg, const sur
|
|||
qvec3f result;
|
||||
float dotProductFactor = 1.0f;
|
||||
|
||||
const float dp1 = qv::dot(vpl->surfnormal, dir);
|
||||
float dp1 = qv::dot(vpl->surfnormal, dir);
|
||||
const qvec3f sp_vpl = dir * -1.0f;
|
||||
float dp2 = 1.f;//qv::dot(sp_vpl, normal);
|
||||
float dp2 = qv::dot(sp_vpl, normal);
|
||||
|
||||
if (!vpl->omnidirectional) {
|
||||
if (dp1 < 0.0f)
|
||||
return {0}; // sample point behind vpl
|
||||
if (dp2 < 0.0f)
|
||||
return {0}; // vpl behind sample face
|
||||
|
||||
dp2 =
|
||||
0.5f + dp2 * 0.5f; // Rescale a bit to brighten the faces nearly-perpendicular to the surface light plane...
|
||||
|
||||
// Rescale a bit to brighten the faces nearly-perpendicular to the surface light plane...
|
||||
dp1 = 0.5f + dp1 * 0.5f;
|
||||
dp2 = 0.5f + dp2 * 0.5f;
|
||||
|
||||
dotProductFactor = dp1 * dp2;
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -159,7 +159,7 @@ static void MakeSurfaceLightsThread(const mbsp_t *bsp, const settings::worldspaw
|
|||
return;
|
||||
}
|
||||
|
||||
MakeSurfaceLight(bsp, cfg, face, std::nullopt, false/*!(info->flags.native & Q2_SURF_SKY)*/, (info->flags.native & Q2_SURF_SKY), 0, info->value);
|
||||
MakeSurfaceLight(bsp, cfg, face, std::nullopt, !(info->flags.native & Q2_SURF_SKY), (info->flags.native & Q2_SURF_SKY), 0, info->value);
|
||||
}
|
||||
|
||||
// check matching templates
|
||||
|
|
|
|||
Loading…
Reference in New Issue