mirror of
https://github.com/nzp-team/quakespasm.git
synced 2025-03-11 11:41:50 +00:00
NX/VITA: Fix alias models overdarkening and disable overbrights for them
This commit is contained in:
parent
242f341f5e
commit
fa473f0c8e
1 changed files with 16 additions and 30 deletions
|
@ -679,37 +679,23 @@ void R_SetupAliasLighting (entity_t *e)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// minimum light value on gun (24)
|
// cypress -- limit light value on all ents, not
|
||||||
if (e == &cl.viewent)
|
// just viewmodel.
|
||||||
|
add = 72.0f - (lightcolor[0] + lightcolor[1] + lightcolor[2]);
|
||||||
|
if (add > 0.0f)
|
||||||
{
|
{
|
||||||
add = 72.0f - (lightcolor[0] + lightcolor[1] + lightcolor[2]);
|
lightcolor[0] += add / 3.0f;
|
||||||
if (add > 0.0f)
|
lightcolor[1] += add / 3.0f;
|
||||||
{
|
lightcolor[2] += add / 3.0f;
|
||||||
lightcolor[0] += add / 3.0f;
|
|
||||||
lightcolor[1] += add / 3.0f;
|
|
||||||
lightcolor[2] += add / 3.0f;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// minimum light value on players (8)
|
|
||||||
if (currententity > cl_entities && currententity <= cl_entities + cl.maxclients)
|
|
||||||
{
|
|
||||||
add = 24.0f - (lightcolor[0] + lightcolor[1] + lightcolor[2]);
|
|
||||||
if (add > 0.0f)
|
|
||||||
{
|
|
||||||
lightcolor[0] += add / 3.0f;
|
|
||||||
lightcolor[1] += add / 3.0f;
|
|
||||||
lightcolor[2] += add / 3.0f;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// clamp lighting so it doesn't overbright as much (96)
|
// clamp lighting so it doesn't overbright as much (96)
|
||||||
if (overbright)
|
// if (overbright)
|
||||||
{
|
// {
|
||||||
add = 288.0f / (lightcolor[0] + lightcolor[1] + lightcolor[2]);
|
// add = 288.0f / (lightcolor[0] + lightcolor[1] + lightcolor[2]);
|
||||||
if (add < 1.0f)
|
// if (add < 1.0f)
|
||||||
VectorScale(lightcolor, add, lightcolor);
|
// VectorScale(lightcolor, add, lightcolor);
|
||||||
}
|
// }
|
||||||
|
|
||||||
//hack up the brightness when fullbrights but no overbrights (256)
|
//hack up the brightness when fullbrights but no overbrights (256)
|
||||||
if (gl_fullbrights.value && !gl_overbright_models.value)
|
if (gl_fullbrights.value && !gl_overbright_models.value)
|
||||||
|
@ -723,9 +709,9 @@ void R_SetupAliasLighting (entity_t *e)
|
||||||
// motolegacy -- re-te EF_FULLBRIGHT support
|
// motolegacy -- re-te EF_FULLBRIGHT support
|
||||||
// TODO: potentially just block dlights from colorizing
|
// TODO: potentially just block dlights from colorizing
|
||||||
if (e->effects & EF_FULLBRIGHT) {
|
if (e->effects & EF_FULLBRIGHT) {
|
||||||
lightcolor[0] = 96.0f;
|
lightcolor[0] = 400.0f;
|
||||||
lightcolor[1] = 96.0f;
|
lightcolor[1] = 400.0f;
|
||||||
lightcolor[2] = 96.0f;
|
lightcolor[2] = 400.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
quantizedangle = ((int)(e->angles[1] * (SHADEDOT_QUANT / 360.0))) & (SHADEDOT_QUANT - 1);
|
quantizedangle = ((int)(e->angles[1] * (SHADEDOT_QUANT / 360.0))) & (SHADEDOT_QUANT - 1);
|
||||||
|
|
Loading…
Reference in a new issue