Exclude fullbright stuff from tracelighting
This commit is contained in:
parent
acdf49ee7a
commit
be36118017
3 changed files with 11 additions and 4 deletions
|
|
@ -306,7 +306,7 @@ public:
|
|||
void AddOtherFloorPlane(int sector, gl_subsectorrendernode * node, FRenderState& state);
|
||||
void AddOtherCeilingPlane(int sector, gl_subsectorrendernode * node, FRenderState& state);
|
||||
|
||||
void GetDynSpriteLight(AActor *self, float x, float y, float z, FLightNode *node, int portalgroup, float *out);
|
||||
void GetDynSpriteLight(AActor *self, float x, float y, float z, FLightNode *node, int portalgroup, float *out, bool fullbright);
|
||||
void GetDynSpriteLight(AActor *thing, particle_t *particle, float *out);
|
||||
|
||||
void PreparePlayerSprites(sector_t * viewsector, area_t in_area, FRenderState& state);
|
||||
|
|
|
|||
|
|
@ -120,8 +120,11 @@ float inverseSquareAttenuation(float dist, float radius, float strength)
|
|||
return (b * b) / (dist * dist + 1.0) * strength;
|
||||
}
|
||||
|
||||
void HWDrawInfo::GetDynSpriteLight(AActor *self, float x, float y, float z, FLightNode *node, int portalgroup, float *out)
|
||||
void HWDrawInfo::GetDynSpriteLight(AActor *self, float x, float y, float z, FLightNode *node, int portalgroup, float *out, bool fullbright)
|
||||
{
|
||||
if (fullbright)
|
||||
return;
|
||||
|
||||
FDynamicLight *light;
|
||||
float frac, lr, lg, lb;
|
||||
float radius;
|
||||
|
|
@ -234,11 +237,11 @@ void HWDrawInfo::GetDynSpriteLight(AActor *thing, particle_t *particle, float *o
|
|||
{
|
||||
if (thing != NULL)
|
||||
{
|
||||
GetDynSpriteLight(thing, (float)thing->X(), (float)thing->Y(), (float)thing->Center(), thing->section->lighthead, thing->Sector->PortalGroup, out);
|
||||
GetDynSpriteLight(thing, (float)thing->X(), (float)thing->Y(), (float)thing->Center(), thing->section->lighthead, thing->Sector->PortalGroup, out, (thing->flags5 & MF5_BRIGHT));
|
||||
}
|
||||
else if (particle != NULL)
|
||||
{
|
||||
GetDynSpriteLight(NULL, (float)particle->Pos.X, (float)particle->Pos.Y, (float)particle->Pos.Z, particle->subsector->section->lighthead, particle->subsector->sector->PortalGroup, out);
|
||||
GetDynSpriteLight(NULL, (float)particle->Pos.X, (float)particle->Pos.Y, (float)particle->Pos.Z, particle->subsector->section->lighthead, particle->subsector->sector->PortalGroup, out, (particle->flags & SPF_FULLBRIGHT));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -249,6 +252,9 @@ void hw_GetDynModelLight(HWDrawContext* drawctx, AActor *self, FDynLightData &mo
|
|||
|
||||
if (self)
|
||||
{
|
||||
if ((self->flags5 & MF5_BRIGHT))
|
||||
return;
|
||||
|
||||
auto &addedLights = drawctx->addedLightsArray;
|
||||
|
||||
addedLights.Clear();
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@ class Corona : Actor abstract
|
|||
{
|
||||
RenderStyle "Add";
|
||||
RenderRadius 1024.0;
|
||||
+BRIGHT
|
||||
+NOINTERACTION
|
||||
+NOGRAVITY
|
||||
+FORCEXYBILLBOARD
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue