Bias Disabled by Default

edited 2006 May 26 in Developers
<i>This post was originally made by <b>skyjake</b> on the dengDevs blog. It was posted under the categories: Beta 4, Engine.</i>

Until we optimize the light grid initialization and runtime impact of bias lighting, I will disable all of the SB/LG code by default. At the moment, even though rend-bias and rend-bias-grid are set to zero, Shark tells me that there are many SB-routines taking up a considerable amount of time even though the data is not used anywhere.

This is with rend-bias-grid enabled:
<pre>+ 32.9% LG_ApplySector (Doomsday)
| + 32.9% LG_Update (Doomsday)
| | - 32.9% Rend_RenderMap (Doomsday)
+ 11.5% LG_Update (Doomsday)
| + 11.5% Rend_RenderMap (Doomsday)
| | - 11.5% R_RenderPlayerView (Doomsday)
+ 8.2% SB_TrackerApply (Doomsday)
| + 7.3% SB_BeginFrame (Doomsday)
| | - 7.3% Rend_RenderMap (Doomsday)
| + 0.8% SB_MarkPlaneChanges (Doomsday)
| | - 0.8% SB_BeginFrame (Doomsday)
+ 4.9% SB_ChangeInAffected (Doomsday)
| - 4.1% SB_BeginFrame (Doomsday)
| + 0.8% SB_MarkPlaneChanges (Doomsday)
| | - 0.8% SB_BeginFrame (Doomsday)
+ 2.6% R_UpdateSector (Doomsday)
| + 2.6% SetProperty (Doomsday)
| | + 2.6% P_Callbackp (Doomsday)
| | | - 2.2% P_SetFloatp (Doomsday)
| | | - 0.3% P_SetBytep (Doomsday)
| | | - 0.2% P_SetIntp (Doomsday)
- 2.5% SB_TrackerCheck (Doomsday)
- 2.3% LG_SectorChanged (Doomsday)
</pre>

This is with rend-bias and rend-bias-grid disabled:
<pre>
+ 19.6% SB_TrackerApply (Doomsday)
| - 17.6% SB_BeginFrame (Doomsday)
| - 2.0% SB_MarkPlaneChanges (Doomsday)
+ 11.0% SB_ChangeInAffected (Doomsday)
| + 9.0% SB_BeginFrame (Doomsday)
| | - 9.0% Rend_RenderMap (Doomsday)
| + 1.9% SB_MarkPlaneChanges (Doomsday)
| | - 1.9% SB_BeginFrame (Doomsday)
- 6.2% SB_TrackerCheck (Doomsday)
- 5.2% Rend_DecorateLine (Doomsday)
- 3.3% SB_BeginFrame (Doomsday)
+ 2.6% R_UpdateSector (Doomsday)
| - 2.6% SetProperty (Doomsday)
</pre>

I will make sure that if SB/LG is not in use, the SB routines won't take up time.

Comments

  • Looks like we have quite a bit to do towards optimizing SB and the LG. Since we have a fair bit of tweaking to do (not planned until Beta5) it does make sense to disable them by default in Beta4.

    With SB we should completely disable the tracker update/monitoring if rend-bias is disabled and then do a one-time mass update if activated in-game.

    At what point are these results from?
  • These results were measured in the starting room of STEEL.PK3, just standing still. On my system, the latest revision runs in the region of 80-100 FPS when SB/LG are disabled. Before I made any tweaks, I got 20-30 FPS (LG/SB disabled).

    When we have proper update notifications from DMU, it should be possible to redesign at least the LG updates to work much faster. It seems the slowest operations are LG_Update and the SB change tracking. But I think there are still a couple of features missing from SB/LG that have to be in place before we can really start optimizing it. At least mobj SB evaluations and better LoS test for bias sources come to mind.
Sign In or Register to comment.