1233 Commits

Author SHA1 Message Date
Lorenz Junglas
3b26dee50f Improve package download- #5525
- 16 -> 64 parallel downloads: ~600 -> ~1350 small files/sec (2.2x)
- Stream response bodies to disk instead of buffering: 739MB -> 3MB peak heap on a 610MB file
- HTTP/2 so those 64 downloads share connections instead of opening 64 sockets
- Better Backoff and retry logic
- Change TaskCanceledException -> OperationCanceledException in a few places
2026-08-03 16:31:26 +00:00
Lorenz Junglas
a78983234f Stop the GPU resource viewer keeping the textures it lists alive 2026-08-03 17:10:40 +02:00
Lorenz Junglas
01970158dc Expire NativeResourceCache entries ourselves instead of via MemoryCache 2026-08-03 17:10:40 +02:00
Sol Williams
4ade32f393 CloudDirectory fixes (#5249)
* Store package:file relationships in a separate links table to support many-to-many tracking
* Prefer versions of files from the newer package when encountering a file shared between packages, so updating packages always takes precedence
* Package validation improvements: verify file size on disk matches entry, hardening for shared files
2026-08-03 15:01:12 +01:00
Carson Kompon
245777e6e1 Streamer Mode Setting (#5473)
- Added `Preferences.StreamerMode`, which shows as a "Streamer Mode" setting in the "Game" tab
- Added `Steam.GetAnonymousName()` for when Streamer Mode is enabled
- `Friend.Name` and `Friend.DisplayName` returns an anonymous name when enabled
- `AvatarLoader` returns an anonymous profile picture when enabled, procedurally generated
- `Connection.Name` returns an anonymous name when enabled
- `Profile.Name` returns an anonymous name when enabled
- `"👋 PLAYER_NAME has joined the game"` chat messages are no longer sent as a string, but a new net message with the steamid so clients can resolve the player names on their own (so Streamer Mode shows anonymous names)
2026-08-03 08:17:48 -04:00
sboxbot
9e230d5db5 Include library and transient assets in editor file networking (#5526)
Editor, send library and transient assets to connecting clients.
2026-08-03 12:26:10 +02:00
Tony Ferguson
65ed7746cb Steam Controller Support (#5430)
* Added Steam Controller / Deck glyphs
* Drop GameControllerType, pass in Name
* Add Nintendo Switch glyphs
* Update SDL3 to 3.5.0, including gamecontrollerdb.txt update
2026-08-03 10:55:10 +01:00
sboxbot
64cff356d2 Fix Hammer light_environment SkyColor not applying to DirectionalLight (#5523)
Co-authored-by: dictateurfou <stevenhervy@gmail.com>
Co-authored-by: Matt Stevens <matt@mattstevens.co.uk>
2026-08-03 09:20:38 +00:00
Sol Williams
b4194e0f3b Quake: support 6-sided skyboxes (_sky), update thumbnails (#5514) 2026-07-31 18:08:21 +01:00
Sam Pavlovic
6a20f0bda5 Static Shadows Cache (#5147)
* Simpler light caching

* Simpler cube cache as well, benchmark on RX580 goes from 248ms to 55ms

* Fix logic

* CRenderContext::CopyTexture copies slices for cube in one GPU command

* Do texture copy in a layer so that we handle it all in sequence during scenesystem rendering

* Use Transform Version instead of key, get cache texture only when we actually want it, as cheap for the cpu as it was before

* Only do static caching if our light is static

* Shared cache code for lights (including static cache) instead of duplicating

* Potential fix for pull request finding In the vkCmdCopyImage path, dstOffset.y is set from nDestX instead of nDestY. This will copy to the wrong Y position (and can trigger out-of-bounds clamping/validation errors when nDestX != nDestY).

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-07-30 18:12:46 +00:00
Sam Pavlovic
f3d860a340 Bloom 3 (#5384)
* Re-do Bloom based how Jimenez, SIGGRAPH 2014 did, remove gamma shit, biquadratic shit, add bloom tint

* Compile shaders

* Format

* Adjust bloom tests, these are no longer relevant

* Mark obsolete properties for Gamma and Filter in Bloom effect

* Blend with rgb only
2026-07-30 17:12:33 +00:00
Matt Stevens
4efb2d7c5e This test is shit 2026-07-30 17:55:19 +01:00
Gamah Gamerson
42cee6807d Http.RequestStreamAsync: stream the response instead of buffering it
RequestStreamAsync went through RequestAsync, which sends with the
default HttpCompletionOption.ResponseContentRead - so the whole body was
downloaded before the task resolved, and the "stream" handed back was
the buffer. A response that never ends (NDJSON, SSE, a chunked long
poll) therefore never resolved at all.

It also did `using var response`, disposing the response and with it the
content stream, before returning that stream to the caller. That second
bug hid the first: you could not read the stream far enough to notice
the buffering.

Send with ResponseHeadersRead and return a stream that owns the
HttpResponseMessage and disposes it with itself. RequestAsync's
signature is untouched, so no Sandbox.Access change is needed, and the
consumer side (System.IO.Stream.*, StreamReader) was already
whitelisted. Validation is unaffected: SboxHttpHandler runs
Http.IsAllowedAsync before every send, redirects included, all before
the headers come back.

WebTests.HttpStreamTest serves paced chunked NDJSON on localhost:8080 (a
port Http.IsAllowed accepts) and asserts the call returns before the
body ends, that the lines arrive spread across it rather than at once,
and that a non-2xx still throws.
2026-07-30 17:55:19 +01:00
sboxbot
a62542310f Add debug name to command list error message (#5510)
* Add debug name to command list error message

* simplify

---------

Co-authored-by: boxrocket <boxrocket6803@gmail.com>
2026-07-30 17:06:18 +01:00
Lorenz Junglas
a51221fc8c Fix nav agent avoiding goal when goal is next to a wall (#5506)
Before: https://files.smallfi.sh/ubre/11ffe58/sbox-dev_2026-07-29_22-16-00.mp4
After: https://files.facepunch.com/lolleko/2026/July/30_14-27-AdorableAmericanwarmblood.mp4
2026-07-30 17:08:23 +02:00
Sam Pavlovic
d8d0f9b67f Guard Aspect against NaN and build CameraComponent FoV from current camera rect instead of screen's (#5512)
* Guard Aspect against NaN and build CameraComponent FoV from current camera rect instead of screen's

Getting screen's aspect is actually wrong if we have more than one camera in play (eg splitscreen)

Screen.Aspect not being set until playing is our intended behaviour for what I remember

Fixes https://github.com/Facepunch/sbox/issues/5319

* Add tests and update comment
2026-07-30 14:56:59 +00:00
Matt Stevens
276f4cbcfa Make R2 uploads more resilient in CI 2026-07-30 15:54:53 +01:00
Alex Guthrie
d6da114d44 Bring back multiple asset browsers (#5378) 2026-07-30 15:47:03 +01:00
Alex Guthrie
36e207de0c CSS Isolation Property (#5351) 2026-07-30 15:46:09 +01:00
Sam Pavlovic
4e43c04ebb Remove Receiver plane depth bias - Fix Shadow Acne Quad Divergence (#5383)
* Use Normal-offset shadows to deal with shadow acne and peter panning instead of Receiver plane depth bias

much simpler technique and it's what modern game engines use

* Apply shadow normal offset to each shadow type

* Default bias to zero since ApplyShadowNormalOffset deals with it

* ApplyShadowNormalOffset also takes PCF kernel radius

* Update shaders

* Normal bias now scales with PCF kernel size with actual shadow hardness

* build shaders
2026-07-30 16:31:38 +02:00
Sam Pavlovic
b7f29498af Fix Shadow Masks Textures Having A 1 Frame Creation Delay (#5335)
* GetOrCreateShadowMask() API for shadow masks, simpler to get a per-view texture for the mask and is resolved on the same frame, fixes 1 frame delay on screenspace shadows and VR rendering of them

* Start cleaning up this ShadowMask API

* Move shadow mask stuff to command list, the way we do SSS still needs some stuff we cant nicely expose so use AddAction

* Remove rendering callback from DirectionalLight, add commandlists to scenelight

* Stash a system for shadow masks so I'll revisit later when to make this public

* Do this much simpler, don't expose API for shadow masks yet, intentionally make screenspace shadows part of shadowmapper

* Make this private again and format

* A8 instead of R16

* Only managed cameras reach OnRenderStage, so only they ever clear/dispatch into the mask.

* Use light pointer instead of gethashcode for getting shadow mask

* Init shadowmasktextureindex
2026-07-30 16:23:08 +02:00
766974616c79
f5014c7e92 Fix Steam.SteamId for Dedicated Server 2026-07-30 14:05:36 +01:00
boxrocket
fd13dd19bc BaseFileSystem.FileExists returns false instead of exception on null/empty path 2026-07-30 13:56:17 +01:00
boxrocket
2852234486 added constructor for extension to FilePathAttribute 2026-07-30 13:55:55 +01:00
sboxbot
86f6dbaa4b Fix Hammer physic_entity prop not applying MaterialGroup at runtime (#5501)
* fix skin not set to prop

* remove shit using added when i try body group

---------

Co-authored-by: dictateurfou <stevenhervy@gmail.com>
2026-07-30 13:55:03 +01:00
Layla
59d8abfbcb read loop from WAV cue chunk, fix load options not defaulting so every sound looped (#5496) 2026-07-30 12:36:25 +01:00
Carson Kompon
6434fc08c8 Don't cache overridesDrawGizmos on component instances (#5490)
Fixes not being able to add/remove DrawGizmos from a component within a hotload (had to restart editor prior)
2026-07-30 07:35:03 -04:00
Lorenz Junglas
c1cffd9f43 Fix mixer processors not applying to child mixers (#5488)
Regressed in 4ab8776fdb (multi-listener support).

* Child mixers now feed the parent per listener instead of a pre-collapsed buffer, so a mixer's processors cover its whole subtree.
* Volume is applied before that handoff, keeping the gain cascade intact.
2026-07-30 13:32:11 +02:00
Layla
4342141f99 fix mesh component vanishing after editing mesh in prefab (#5457) 2026-07-30 12:16:37 +01:00
wheatleymf
22056fceee Add public "Index" to SamplerStates for bindless (#5487)
- Adds public `SamplerState.Index` so you can get bindless index for your sampler state and expose it to shaders using `Bindless::GetSampler( int nIndex )`
2026-07-30 09:32:39 +02:00
sboxbot
a09f6b53bc Add Input.SetLastAction (#5489)
When used together with Input.SetAction you can make `Input.Pressed` and `Input.Released` return true.

Co-authored-by: badandbest <91832803+badandbest@users.noreply.github.com>
2026-07-29 08:48:30 -04:00
Matt Stevens
7cd3294971 vfx_vulkan: Slang compiler, remove DXC and dead D3D11 backends
still using DXC as a preprocessor for ANTLR, but that can probably be
fucked off
2026-07-29 10:16:19 +01:00
Nolankicks
6606fbb748 Fix NullReferenceException in WaterVolume.OnFixedUpdate
Guards against a null collider in LINQ chain
2026-07-29 11:05:22 +02:00
Mykol Word
a765f86983 Changed fallback message from error to warning 2026-07-29 11:05:03 +02:00
Mykol Word
4d0b68bb54 Log error when font load fails and falls back to system font 2026-07-29 11:05:03 +02:00
Layla
93ba99fc86 support quake sky surfaces, they were missing in thumbs (#5486) 2026-07-29 10:03:19 +01:00
Sol Williams
b0747c1311 Mounts: map thumbs (#5472)
* SceneLoader can provide thumbs (a custom override or from disk)

* mount_generatethumb(s) concmds - writes mount scene thumb to disk on the correct path

* Quake: tag info_intermission as map_preview

* quake map thumbs

* help is backwards whoops

* guard against disposing the singleton ffs
2026-07-28 21:39:58 +01:00
Layla
ddcde5abcd primitive tool ux pass (#5429) 2026-07-28 19:57:13 +01:00
Relic
ad77bdf8d0 Fix off-by-one in Texture.GetPixels dest array bounds check
The bounds check in GetPixels was rejecting valid destination arrays
that exactly fit the requested source rectangle.
2026-07-28 12:15:30 +02:00
Layla
3691807fe8 Model builder bindings (#5421) 2026-07-27 21:56:08 +01:00
Carson Kompon
f4e09e3ac4 Reward Drop Tweaks (#5445)
- The rewards scene will always simulate a reward when testing in the Editor (doesn't grant any real items)
- Reward drops now show if you already own an item (and how many) on the item cards

https://files.facepunch.com/CarsonKompon/2026/July/24_08-20-GroundedAmurstarfish.png
2026-07-27 12:54:47 -04:00
Matt Stevens
b72c5e2ae4 rendersystemvulkan: built-in shaders are offline compiled & embedded spir-v, removing runtime dependency on dxc
# Conflicts:
#	src/rendersystem/rendersystemvulkan.vpc
2026-07-27 16:52:47 +01:00
Layla
4596a055e6 physics debug draw requires cheats or editor (#5444) 2026-07-27 13:07:51 +01:00
Layla
21438026fd Fix multi scene hotkeys (#5438) 2026-07-27 10:30:32 +01:00
Lorenz Junglas
2c15cb73a3 Optimize clutter allocations (#5459) 2026-07-27 11:29:50 +02:00
Layla
7246e48a8b add import scale with unit presets, remember options (#5435) 2026-07-27 10:15:12 +01:00
Layla
59290bb827 add remove bad geometry to object mode (#5441) 2026-07-27 10:10:41 +01:00
Layla
daacff1898 quad slice falls back to four sharpest corners (#5447) 2026-07-27 10:08:58 +01:00
Layla
86bf39b67f draw bad face outlines in mapping mode (#5446) 2026-07-27 10:08:48 +01:00
Layla
865e279a50 update ns2 model loader from mount testbed that supports animations (#5448) 2026-07-27 10:08:28 +01:00