6 stories

Per-entity materials suggested instead of the matproxy library

In #lua-help, full metal sergeant 228 asked whether there's a better way to do controllable textures, since he heard the default matproxy library is very slow, and noted LVS creates a material per entity. Artemking4 suggested instancing a material per usage from a base material and changing only what's needed. Asked by TankNut how slow matproxy must be for that to be the alternative, he said creating materials is "dirt cheap" because they are just containers for shader inputs.

JSONToTable converts vector-like strings even with ignoreConversions

In #lua-help, 0d9b reported that util.JSONToTable turns strings that look like vectors into vectors even when called with ignoreConversions set to true. He asked whether this is intended, calling a JSON parser that mangles the output without an option to keep the original values "a bit useless for... parsing json". Artemking4 said he prefers MessagePack.

TankNut: no Lua equivalent of PhysicsImpact for physics-driven player movement

In #developer-talk, TankNut described problems with his physics-driven mech: movement is unpredicted, so multiplayer feels slow, and hook order breaks things because the mech moves in PhysicsUpdate after its turrets update in PlayerPostThink/Think. He added that the biggest problem in recreating player movement is that Lua has no equivalent of entity->PhysicsImpact, though ApplyForceOffset might be enough. He later said it may matter less, since it seems to be only for touch-related things.

8 stories

math.ceil/floor fix ported; "load quick" no longer boots you without a quick save

Commit bb557c on main ports a fix for math.ceil/math.floor, adds self checks for corrupted map files and stops the load command from booting you out of the session when the save is missing.

Details
  • Port a fix for math.ceil/math.floor
  • Self checks for corrupted map files
  • load doesn't boot you from the session for missing saves, so an accidental "load quick" bind press is harmless
  • Fixed ZFunc not being set when overriding depth testing
  • Fixed a regression with DPanel:OnMousePressed due to recent changes
  • Merged PR: ENT:StoreOutput treats times=0 the same as times=-1

Fading static props stop writing depth

In #next-update, Earu asked why fading static props stop writing depth while they fade out. Artemking4 and Evgeny Akabenko explained that fading props are moved to the translucent pass, and translucent objects don't write depth. In the evening discussion, Rubat asked why transparent props would write depth at all, and said alpha testing is irrelevant for fadeouts. Earu said he would remove his issue. Evgeny Akabenko and Earu then discussed dithered fades combined with TAA.

6 stories

Prediction errors now show the array index; multicore memory leaks fixed

Commit 9ecf4a on main makes prediction errors on arrays include the index for ints and floats, fixes a couple of multicore rendering memory leaks and a crash in render.UpdateScreenEffectTexture.

Details
  • GitHub Actions updated to version 6 for Linux and Windows
  • trigger_portal_cleanser added to the entity override whitelist
  • Fixed a crash with render.UpdateScreenEffectTexture
  • widgets.RenderMe and properties.GetHovered removed serverside
  • Minor cleanups so methods match the wiki and vice versa
  • Prediction errors on arrays include the array index for ints and floats
  • Fixed a couple of memory leaks with multicore rendering (render.UpdateScreenEffectTexture, render.PushCustomClipPlane)