diff --git a/src/maploader/udmf.cpp b/src/maploader/udmf.cpp index f8f7b2b8a..2cf9ccfbf 100644 --- a/src/maploader/udmf.cpp +++ b/src/maploader/udmf.cpp @@ -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); + } } //=========================================================================== diff --git a/src/rendering/hwrenderer/hw_entrypoint.cpp b/src/rendering/hwrenderer/hw_entrypoint.cpp index ba78b7183..22d6d0169 100644 --- a/src/rendering/hwrenderer/hw_entrypoint.cpp +++ b/src/rendering/hwrenderer/hw_entrypoint.cpp @@ -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(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); } diff --git a/wadsrc/static/mapinfo/common.txt b/wadsrc/static/mapinfo/common.txt index 51b2f12de..3ce8ca33d 100644 --- a/wadsrc/static/mapinfo/common.txt +++ b/wadsrc/static/mapinfo/common.txt @@ -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