1197 Commits

Author SHA1 Message Date
James King
99d99e7aff Add GpuBuffer.CopyTo, small rendering API fixes (#4847)
* GpuBuffer.SetData accepts a ReadOnlySpan
* Add RenderTools.CopyGPUBuffer
* Add RenderAttributes.Set(uint) so it doesn't use the float overload
2026-05-19 13:19:17 +01:00
Layla
e2cdba9bb7 fix pivot tool grid snapping when dragging fast (#4862) 2026-05-19 12:48:52 +01:00
Sol Williams
96c002d62c Allow some LoadAllGameResource calls to replace existing resources (#4831)
* Allow reloading loaded resources when loading addon ontop of parent package during editor startup
* Allow initial NetworkFiles sync to reload/replace existing resources too
2026-05-19 12:31:21 +01:00
Carson Kompon
7b72d31096 Include "Doo" in all names so there's no overlap with other variables… (#4791)
* Include "Doo" in all names so there's no overlap with other variables/methods that a component might have (like IsRunning or Stop)

* Make sure previous functions still work, obsoleted, telling user to use new methods. (These are implemented as extension methods so that member variables cannot conflict with the same name)
2026-05-19 07:27:14 -04:00
Carson Kompon
e47ec3b9ce Add Voice Mixer to default Mixers, ensure Voice Component can ONLY use Voice Mixer/Sub-Mixers (#4704)
- Now, there's a "Voice" mixer that is created along with the Music/Game/UI Mixers
- Existing Games will create the Mixer automatically if it doesn't have it so nothing breaks
- Existing Voice Components will be updated to target the Voice mixer if it doesn't already
- The Mixer dropdown on the Voice Component now only shows the Voice Mixer (or any Mixers that are a descendant). This way no games can circumvent the Voice volume slider in the settings.
2026-05-19 07:25:51 -04:00
Carson Kompon
d3feae5334 Call EditorShortcuts.ReleaseAll when losing focus to ensure no keys are still being held (#4794) 2026-05-19 07:18:14 -04:00
Sam Pavlovic
14511d7a85 Opaque Fade MSAA/Shadows Fix (#4758)
* Opaque Fade works without MSAA

* Opaque fade objects are able to be rendered in shadows2
https://files.facepunch.com/sampavlovic/1b0511b1/sbox-dev_Ip6iXIcqPR.mp4

* Build shaders
2026-05-19 12:44:58 +02:00
Lorenz Junglas
fc2b5d6247 Apply Video Settings on first Launch (#4855)
* Apply Video Settings on first Launch

Video settings were being saved to video.json but never actually pushed to the render device at first launch. On first launch the window would open with whatever the C++ defaults were instead of the managed settings.

* Make borderless native default too
2026-05-19 12:30:24 +02:00
Jason
22374f9063 fix incorrect texture paths (#4710)
everything points to base library correctly now, fixing the square particles
some QoL changes to a few FX as well
2026-05-19 11:19:14 +01:00
Lorenz Junglas
887c72d09d Get rid of array allocations in trace results (#4859)
Every trace allocating an array would cause noticeable GC overhead when shooting lots of traces.

This change inlines the Tag array into the result struct to avoid heap allocation for every trace.
Struct size grows by around 60 bytes from 154 to 214 bytes.
But also get's rid of the `[ThreadStatic] HashSet`, so might even end up using less memory overall.

Obsolete `.Tags` accessor provide `HasTag()` as alternative.
2026-05-19 11:10:56 +01:00
Layla
ac9e460f6d don't set layout twice on AnyOfTypeControlWidget, qt doesn't allow it - just remove layout from DropdownControlWidget, it adds nothing to layout anyway 2026-05-19 10:54:59 +01:00
Matt
b3b4bcb94c Rebuild descriptors when resizing UI in ScreenshotService. Ensures UI resolution matches screenshot resolution. 2026-05-19 10:53:38 +01:00
sboxbot
189347b633 Unfocusing a TreeView item should commit any pending name change (#4851)
* Unfocusing a TreeView item should commit any pending name change. The early Visible return was blocking as the popup is already hidden at this point.

* formatting

---------

Co-authored-by: matt944 <matt@ninetyfour.dev>
2026-05-19 10:53:21 +01:00
matt944
15afd047ad Remove stale config values on failed deserialization 2026-05-19 10:50:28 +01:00
matt944
c124e78ec5 Init GameObjectSystem with default values. Previously property initializers and [DefaultValue] attributes were disregarded. 2026-05-19 10:50:28 +01:00
Garry Newman
ad7ce148cb Welcome Screen (#4854)
* Hide FeaturedStoreItem
* Mark Label.IsRich and Label.Text with [Parameter] so it shows in Razor intellisense
* Add support for cubic-bezier()
* Add support for step-start, step-end, step( x, x )
* Change how button:active styles to reduce ignored clicks
* Fix ArgumentNullException calling SelectionSystem.Remove
* Protect against NRE in UISystem.RunDeferredDeletion
* Welcome screen
* Support all the ways box-shadow can be parsed
2026-05-18 19:13:03 +01:00
Alex Guthrie
c6394988cd Redesign package modal to match rest of UI, similar layout to web (#4778)
https://files.facepunch.com/alexguthrie/1b0611b1/1I7IiLtGgQ.png
2026-05-18 14:50:08 +01:00
Layla
5073e5f900 fix vertex painting not working with custom blendable shaders (#4843) 2026-05-18 13:32:40 +01:00
Matt Stevens
05b8ed6dc2 Collect GpuFrametime with analytics 2026-05-18 11:07:53 +01:00
Antoine Pilote
a0b7a8566f Fix systemscene overwritting game object systems of actual scene (#4799) 2026-05-17 09:50:43 -07:00
Sam Pavlovic
53272aa5ab Fix Clothing Hide Parameter For Humans (#4752) 2026-05-17 13:21:45 +02:00
Antoine Pilote
879d2e888e Show terrain storage grid when painting material. hopefully it gives clarity to the granularity of their terrain storage. (#4802)
https://files.facepunch.com/antopilo/1b0811b1/sbox-dev_REjJjWAJPm.mp4
2026-05-16 14:43:09 -07:00
Matt Stevens
1ed02a54fe Switch from AzureSignTool to sign dotnet tool with Azure Trusted Signing 2026-05-15 22:51:19 +01:00
Layla
1c59d2261c revert unstable box3d update 7 and 8 (#4840) 2026-05-15 09:35:11 +01:00
Sol Williams
f2d844790f SoundFile.FromOgg (#4835) 2026-05-14 11:45:20 +01:00
Matt Stevens
312c52410f Upscalers (#4836)
* Camera motion vectors for static geometry

A full screen pass that creates a motion vector texture from depth +
previous frame view projection.

This is only good for objects that have moved due to camera motion,
per object motion is not captured here - so this is good for static
geometry that does not move, which is the majority of draw calls.

Also this layer only executes if "WantsMotionVectors" is true in the
pipeline's render attributes.

* Add upscaling infrastructure and a simple bilinear stretch upscaler

For stretch upscaler, the scene renders into a low-resolution RT, then
is upscaled to display resolution before post-processing.

* Add FSR upscaler (non temporal)

* Add FSR3 upscaler (temporal)

Temporal upscaler using FSR3 with explicitly no frame generation

Maps to the standard resolution scale factors:
* Native - 1x
* Quality - 1.5x
* Balanced - 1.7x
* Performance - 2x
* Ultra Performance - 3x

* Add all the upscaler cvars to the settings menu

https://files.facepunch.com/matt/1b1311b1/sbox_jIRwaBdWwJ.png

* Add FidelityFX SDK to third-party legal notices

* Add FSR3 reactive mask for viewmodel and overlay objects

* Compiled shaders
2026-05-13 22:57:59 +01:00
Maxime Lebled
513b0ed7fa Citizen/humans: new parameters (#4833)
* Citizen/humans: animgraph, modeldoc & animation asset updates (carried over from animation_soft-ik branch)

* Citizen/animgraph: re-save animgraph to remove orphaned Soft IK values

* Humans/animgraph: derive animgraphs from updates

* Citizen/humans: oops, forgot to remove the debug wiring

* Citizen/humans: fix second half of the optimize check that wouldn't allow it to go backwards with regards to scale_heel & scale_height
2026-05-13 18:28:22 +01:00
Sol Williams
2ae14147c2 Use more of the impact sound variants we've got (#4808) 2026-05-13 17:00:06 +01:00
Sol Williams
785ccee8ad Fix DefaultMap stomping map selection for games that don't use the create game modal (#4832) 2026-05-13 16:58:15 +01:00
Layla
4ad92bebbe Box3d update 8 (#4834) 2026-05-13 16:31:18 +01:00
Matt Stevens
2c5e0b63dd .popup-panel, .popup need a higher z-index since layered modals also have higher layered z-index now 2026-05-13 13:37:46 +01:00
Sol Williams
5ad5186b90 Update IsEditorAssembly for addons (#4798) 2026-05-12 17:15:22 +01:00
Sol Williams
d68a253470 Editor: render platform overlay on active play/game widget (#4818) 2026-05-12 17:15:00 +01:00
Matt Stevens
c3c98be9d0 Update GameTask.WhenAny methods to Task<Task> too 2026-05-12 15:11:34 +01:00
Matt Stevens
2fd9c998c3 Fix TaskSource.WhenAny not returning the completed task
Now returns Task<Task> matching the standard Task.WhenAny API contract

Fixes Facepunch/sbox-public#2270
2026-05-12 15:11:34 +01:00
Matt Stevens
6567359e50 Don't publish any . folders or files, instead of trying to select them all 2026-05-12 15:11:09 +01:00
Layla
a357ffb686 update runtime configs to match sbox.runtimeconfig.json (#4824) 2026-05-12 15:05:46 +01:00
Layla
486cccb725 make sure any components modelphysics creates are available immediately after (#4826) 2026-05-12 15:05:19 +01:00
Layla
215f94dd55 fix vertex colors lost during mesh topology operations (#4827)
* fix vertex colors lost during mesh topology operations

* copy edge flags, edge smoothing bool is unused
2026-05-12 15:04:33 +01:00
Layla
554c69354e port over vertex extrude from hammer, extrude on shift drag (#4810) 2026-05-11 20:30:20 +01:00
Layla
d49d459894 Fix/multi edge merge (#4809) 2026-05-11 20:28:39 +01:00
Layla
62f560f1e5 Mesh vertex select loop (#4811) 2026-05-11 20:28:24 +01:00
Layla
ead6c51398 check for invalid faces of edges (#4817) 2026-05-11 20:28:10 +01:00
Layla
af6ea420b8 fix BoolControlWidget not calling SignalValuesChanged (#4816) 2026-05-11 10:13:28 +01:00
Layla
9e8afe731a move these few stubborn required files over to engine2 so I don't have to see entity2 project anymore (#4813) 2026-05-10 21:34:49 +01:00
Layla
17092f585b add Rigidbody.SleepThreshold as an advanced property (#4812) 2026-05-10 13:50:39 +01:00
Layla
8f9029bfa7 add Scene.Trace.Cone (#4759) 2026-05-10 00:55:46 +01:00
Lorenz Junglas
0344b0bafd Fix NRE for new console autocomplete (#4795)
I tested concmds but forgot to test convars, which now throw an NRE when typing.
2026-05-08 17:55:43 +02:00
Lorenz Junglas
12e3ad13aa Fix issues reported in PVS analysis (#4406)
* Fix issues reported in PVS analysis

https://pvs-studio.com/en/blog/posts/csharp/1356/

* Initial version of concmd argument autocomplete/hints

https://files.facepunch.com/lolleko/2026/March/27_09-38-ApprehensiveGermanshorthairedpointer.mp4
2026-05-08 14:19:55 +01:00
Matt Stevens
5b14227991 Explosive props detonate instantly from impact damage
Before 😡: https://files.facepunch.com/matt/1b0811b1/sbox.2026.05.08.10.59.44.mp4
After 😄: https://files.facepunch.com/matt/1b0811b1/sbox.2026.05.08.11.11.31.mp4
2026-05-08 12:51:17 +01:00