1 story

Artemking4 finds why bone 0 breaks IMesh:DrawSkinned

Artemking4 found the root cause of the bone 0 problem in IMesh:DrawSkinned: in shaderapidx8.cpp, bone 0 is also loaded as the model matrix, so rendering breaks unless it is reset afterwards. Wrapping the call in cam.PushModelMatrix and the matching pop fixes it, and he asks for bone 0 to be exposed.

Details

Without bone 0, player and NPC models that use all 53 bones have to be split into two draw calls, which hurts performance. The issue includes screenshots and a spiral test script. It follows his earlier argument with Rubat in #next-update about whether DrawSkinned should allow bone 0.

3 stories · 3 updates

Empty model handling reworked, prediction error counting fix, icons for new TF2 maps

Commit 5bca5b on main reworks how 0-byte model files are handled ("Change where it bails so maybe its less error prone?"), fixes prediction error counting for certain fields and adds icons for the 5 new TF2 maps.

Details

The empty model fix also reached the x86-64 beta separately in commit 7e5aa8, together with the earlier "Handle 0 byte model files crashing the game" change.

Rubat reverts the SetPos touch and DrawTexturedRectUV changes

Commit 09a162 on main makes the change that had Entity:SetPos fire trigger touch events opt-in via a separate argument, since it caused infinite loops in existing addons such as TTT. The UV behaviour without the sub-pixel adjustment moves to a new function, surface.DrawTexturedRectRawUV, so surface.DrawTexturedRectUV works the old way again.

Details

This answers the complaints of the past days: RNDX and addons that compensated for the old adjustment no longer break. The same commit also fixes NPC-related crashes and lua_refresh_file autocomplete, adds the serverside Player:RunConsoleCommand (with the same limitations as the global RunConsoleCommand) and uses it in some Sandbox tools, and fixes citizen_sheet_bloody.vtf looking blurry. The changes reached the x86-64 beta in the large merge commit cfa73c.

Request: Player:RunConsoleCommand

Added in commit 09a162 and the request was closed as completed: Player:RunConsoleCommand is serverside only, has the same limitations as the global RunConsoleCommand, and some Sandbox tools already use it. The same commit adds lua_refresh_file autocomplete (#3428) and fixes the blurry citizen_sheet_bloody.vtf texture (garrysmod-issues #7116).

Two long-standing bugs: gamemode switch reverts, Workshop changes unload server content

TotallyARussian reported two long-standing bugs on the x86-64 beta: in #7117, a gamemode changed during a game reverts to the previous one on the next map; in #7118, subscribing to or unsubscribing from an addon while on a server unloads the server's content, turning models into errors.

Details

He says both happen on all branches and have for a long time. For now, the only reliable way to switch gamemodes is to quit the map and do it in the main menu. No developer replies yet.

4 stories · 1 update

Xenthio explains how his Source 2-style renderer works

In #developer-talk, Xenthio explained that his Source 2-style renderer is a replacement for shaderapi plus his own lightmap baker. Baking takes about 40 seconds on a map's first load; after that the map opens instantly.

Details

He plans bicubic lightmaps. Evgeny Akabenko showed a comparison and asked about seams, the main problem with bicubic filtering; Xenthio said he hasn't tackled that yet.

5 stories · 1 update

1 story