mirror of
https://github.com/ZDoom/Raze.git
synced 2025-01-18 14:41:55 +00:00
polymer: only let emitshadow affect shadows, not lightmaps.
Lightmaps are already opt-in anyway. git-svn-id: https://svn.eduke32.com/eduke32@3093 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
e726484ccc
commit
67c7d67166
1 changed files with 11 additions and 14 deletions
|
@ -1479,7 +1479,7 @@ int16_t polymer_addlight(_prlight* light)
|
|||
|
||||
Bmemcpy(&prlights[lighti], light, sizeof(_prlight));
|
||||
|
||||
if (light->radius && light->publicflags.emitshadow) {
|
||||
if (light->radius) {
|
||||
polymer_processspotlight(&prlights[lighti]);
|
||||
|
||||
// get the texture handle for the lightmap
|
||||
|
@ -4600,18 +4600,15 @@ static int32_t polymer_bindmaterial(_prmaterial material, int16_t* lights,
|
|||
// PR_BIT_SPOT_LIGHT
|
||||
if (prlights[lights[curlight]].radius) {
|
||||
programbits |= prprogrambits[PR_BIT_SPOT_LIGHT].bit;
|
||||
|
||||
if (prlights[lights[curlight]].publicflags.emitshadow) {
|
||||
// PR_BIT_SHADOW_MAP
|
||||
if (prlights[lights[curlight]].rtindex != -1) {
|
||||
programbits |= prprogrambits[PR_BIT_SHADOW_MAP].bit;
|
||||
programbits |= prprogrambits[PR_BIT_PROJECTION_MAP].bit;
|
||||
}
|
||||
// PR_BIT_LIGHT_MAP
|
||||
if (prlights[lights[curlight]].lightmap) {
|
||||
programbits |= prprogrambits[PR_BIT_LIGHT_MAP].bit;
|
||||
programbits |= prprogrambits[PR_BIT_PROJECTION_MAP].bit;
|
||||
}
|
||||
// PR_BIT_SHADOW_MAP
|
||||
if (prlights[lights[curlight]].rtindex != -1) {
|
||||
programbits |= prprogrambits[PR_BIT_SHADOW_MAP].bit;
|
||||
programbits |= prprogrambits[PR_BIT_PROJECTION_MAP].bit;
|
||||
}
|
||||
// PR_BIT_LIGHT_MAP
|
||||
if (prlights[lights[curlight]].lightmap) {
|
||||
programbits |= prprogrambits[PR_BIT_LIGHT_MAP].bit;
|
||||
programbits |= prprogrambits[PR_BIT_PROJECTION_MAP].bit;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -5155,7 +5152,7 @@ static void polymer_updatelights(void)
|
|||
// highly suboptimal
|
||||
polymer_removelight(i);
|
||||
|
||||
if (light->radius && light->publicflags.emitshadow)
|
||||
if (light->radius)
|
||||
polymer_processspotlight(light);
|
||||
|
||||
polymer_culllight(i);
|
||||
|
|
Loading…
Reference in a new issue