Add PBR lightprobe thing and always bake probes if encountered
This commit is contained in:
parent
e29e1578bb
commit
ed0db43eaa
3 changed files with 10 additions and 4 deletions
|
|
@ -916,6 +916,13 @@ public:
|
|||
Level->SunDirection = -FVector3 { pc * angle.Cos(), pc * angle.Sin(), -pitch.Sin() }; // [RaveYard]: is there a dedicated function for this?
|
||||
Level->lightmaps = true;
|
||||
}
|
||||
else if (th->EdNum == 9892) // PBR lightprobe thing
|
||||
{
|
||||
LightProbe probe;
|
||||
probe.position = FVector3((float)th->pos.X, (float)th->pos.Y, (float)th->pos.Z);
|
||||
probe.index = Level->lightProbes.size();
|
||||
Level->lightProbes.Push(probe);
|
||||
}
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ EXTERN_CVAR(Bool, gl_bandedswlight)
|
|||
EXTERN_CVAR(Bool, lm_dynlights);
|
||||
|
||||
CVAR(Bool, gl_raytrace, false, 0/*CVAR_ARCHIVE | CVAR_GLOBALCONFIG*/)
|
||||
CVAR(Bool, gl_lightprobe, false, 0/*CVAR_ARCHIVE | CVAR_GLOBALCONFIG*/)
|
||||
CVAR(Bool, gl_lightprobe, true, 0/*CVAR_ARCHIVE | CVAR_GLOBALCONFIG*/)
|
||||
|
||||
extern bool NoInterpolateView;
|
||||
|
||||
|
|
@ -405,10 +405,9 @@ sector_t* RenderView(player_t* player)
|
|||
});
|
||||
}
|
||||
|
||||
if (gl_lightprobe)
|
||||
if (gl_lightprobe && level.lightProbes.size() > 0)
|
||||
{
|
||||
// Render the light probes if not found in a lump
|
||||
// To do: we need light probe actors
|
||||
|
||||
AActor* lightprobe = level.GetThinkerIterator<AActor>(NAME_LightProbe, STAT_INFO).Next();
|
||||
if (lightprobe)
|
||||
|
|
@ -432,7 +431,6 @@ sector_t* RenderView(player_t* player)
|
|||
}
|
||||
else
|
||||
{
|
||||
Printf("Warning: spawning LightProbe\n");
|
||||
auto probe = Spawn(&level, NAME_LightProbe);
|
||||
probe->ChangeStatNum(STAT_INFO);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -147,6 +147,7 @@ DoomEdNums
|
|||
9884 = SpotLightFlickerRandomTraceAttenuated // ZDRay lightmap spotlight (random flickering)
|
||||
9890 = None // ZDRayInfo
|
||||
9891 = Fogball
|
||||
9892 = None // PBR lightprobe
|
||||
9982 = SecActEyesAboveC
|
||||
9983 = SecActEyesBelowC
|
||||
9988 = CustomSprite
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue