22,417 Commits over 1,614 Days - 0.58cph!
Remove baked lighting ToolsVis, they're nigh useless for us now, the one we actually use is a near duplicate of Diffuse toolsvis
Remove all references to lightmapping combos, they're still available on vertex shader for lightmapping uv input though, PS stubs it out on specialization
Start bindless lightmaps & light probe volume
Bindless Lightmaps use cbuffer directly for indices instead of setting texture parameters, lightmapping conditionals use constants instead of combos now
Bindless Light Probe Volumes
Actually bind bindless lightmaps
Final adjustments, vertex shaders still use lightmapping combo, take out rest of lightingTerms.vDBG_BakedLighting
Spritecard tries to sample lightmaps from vertex shader which isnt what we want, remove dynamic combo rules for lightmaps
Bakeresourcehelper which is used on tools has duplicated LPV constants code, make it use same path that's used for bindless
Remove BATCH_FLAGS_HAS_BAKED_LIGHTING_FROM_VERTEX_STREAM ( unused ) and BATCH_FLAGS_CONTROLLING_COMBO_CHANGES (bullshit now)
Mark bindless lightmaps and LPVs as used, might not be needed but making sure
Update shaders with bindless lightmaps
Double Clicking a Subgraph Node instantly opens the Subgraph
Implemented the file history forward and back buttons when navigating through multiple ShaderGraphs in the same window
https://files.facepunch.com/CarsonKompon/2025/January/21_18-29-MidnightblueSandbarshark.mp4
Remove BATCH_FLAGS_HAS_BAKED_LIGHTING_FROM_VERTEX_STREAM ( unused ) and BATCH_FLAGS_CONTROLLING_COMBO_CHANGES (bullshit now)
Mark bindless lightmaps and LPVs as used, might not be needed but making sure
Enable vulkan 1.2 features (scalarBlockLayout, bda, descriptor indexing, etc.) instead of using all the extensions
Revert "Catch null typedescriptor when cloning"
This reverts commit 04c9f070c908428fd86eea9cbe8355e15aa069c5.
Revert "Reduce JSON usage in GameObject.Clone (#1781)"
This reverts commit 3975bc70bb23755766f1767725aab376864a5260.
Bakeresourcehelper which is used on tools has duplicated LPV constants code, make it use same path that's used for bindless
Subgraph "Add To Node Library" adds the subgraph to the Create Node menu so they can be easily accessed.
https://files.facepunch.com/CarsonKompon/2025/January/21_16-51-HardVampirebat.mp4
Add ConVarFlags.GameSetting
Add internal TypeLibrary.GetMembersWithAttribute<T>
Add EditorUtility.CreateTypeLibrary( CompilerOutput[] )
Publisher: after compiling a game, create new TypeLibrary, load in the game's assemblies, and search for ConVars marked with ConVarFlags.GameSetting, include in metadata when publishing
Add GameSettingsEntry.Default since we'll want to give the controls default values
Implement GameSettingsModal
Add LaunchArguments.GameSettings, apply them when saving new game settings from menu, and run them when we've succesfully opened a game
Icon support for game settings dropdown options, use SwitchControl instead of Checkbox
Add Reset to Default button in GameSettingsModal
Better looking DropDown, reduced default max range, restore saved launch arguments when re-opening modal
Fix error when deserializing SubgraphNodes
SubgraphNode now uses the Title, Description, and Icon from the referenced Subgraph
SubgraphNode now generates inputs from any Parameter nodes in the subgraph, with default names for any without.
SubgraphNodes now generate output plugs from the FunctionResult node in the references Subgraph
https://files.facepunch.com/CarsonKompon/2025/January/21_16-23-CoordinatedEastsiberianlaika.png
Better looking DropDown, reduced default max range, restore saved launch arguments when re-opening modal
Add Reset to Default button in GameSettingsModal
Subgraphs have Title, Description, Category, Icon and Add To Node Library properties. To be used for the created node
Added SubgraphNode which references a .shdrfunc. Results in graph errors if the references graph cannot be found or the references graph has errors
Dragging a .shdrfunc asset into a ShaderGraph will create a Subgraph Node referencing the dragged asset
Catch null typedescriptor when cloning
Bitmap clone, IDisposable, IValid
Can change Preview Blend Mode/Shading Model/Domain in Subgraphs
Implemented all other preview types for FunctionResult
Fix GraphCompiler failing when using Unlit in Subgraphs
Icon support for game settings dropdown options, use SwitchControl instead of Checkbox
Bitmap draw and bitmap pen
Reduce JSON usage in GameObject.Clone (#1781)
We no longer converts the complete GameObject to and from JSON for cloning.
JSON is only used as a last resort for complex properties we cannot clone directly.
Should result in 1.5 to 3 times faster clones (depends on object size).
Add LaunchArguments.GameSettings, apply them when saving new game settings from menu, and run them when we've succesfully opened a game
You can now specify the preview type for certain Output variables on a Subgraph so changes can be reflected in the Preview window.
https://files.facepunch.com/CarsonKompon/2025/January/21_12-51-DifferentAmericanbulldog.mp4
Vulkan 1.2 is minimum requirement, device support remains the same. We already required several extensions that are core in 1.2 such as descriptor indexing
Shaders compiler uses scalar layout instead of std140/std430 layout (VK_EXT_scalar_block_layout is core in 1.2)
This is a much less confusing layout for structures in HLSL, allowing for
tighter packing and generally matching their C++/C# counter parts.
e.g:
```hlsl
struct T {
float a_float;
float3 b_float3;
}
```
The size of struct T was previously 32 bytes with GL layout and is now 16 bytes.
The offset of b_float3 was previously 16 bytes and is now 4 bytes with scalar layout.
More info on rules (previously GL, new Scalar)
microsoft/DirectXShaderCompiler/blob/main/docs/SPIR-V.rst#memory-layout-rules
https://maraneshi.github.io/HLSL-ConstantBufferLayoutVisualizer/
FunctionResult node generates inputs before creating connections to ensure connections are always deserialized correctly
PlugInfo correctly uses property name if no [Title] attribute
Refactor Result node into an abstract BaseResult class which Result and now FunctionResult can both inherit
Clean up TextureControlWidget
Add Color.Rgba16 (half based color)
Add Bitmap class
More bitmap stuff
Implement GameSettingsModal
Fixed NRE when FunctionResult name is left null
Subgraphs no longer attempt to generate a .shader file, and will run error checks in the graph on Save
FunctionResult Inputs now maintain connections upon being regenerated
Add GameSettingsEntry.Default since we'll want to give the controls default values
Add IPopupEditor<T>, EditorUtility.OpenControlSheet looks for this interface when creating a popup
Rename ControlSheetPopup to PopupEditor, make more modular so we can override important bits
Add TextureEditorPopup
Add ConVarFlags.GameSetting
Add internal TypeLibrary.GetMembersWithAttribute<T>
Add EditorUtility.CreateTypeLibrary( CompilerOutput[] )
Publisher: after compiling a game, create new TypeLibrary, load in the game's assemblies, and search for ConVars marked with ConVarFlags.GameSetting, include in metadata when publishing
Added SoundscapeTrigger.Volume so you can control the volume of a Soundscape from the component
Added more property/enum docs to SoundscapeTrigger and gave TriggerType entries [Icon]
Standardize internal way to async replace placeholder textures
Add Sandbox.Utility.ForAsync
TextureGenerators are async
Fixed a bug where calling GameObject.GetPrefab could network spawn game objects. Never network spawn game objects if its scene is a PrefabScene.
Merge branch 'master' of sbox
New Clothing - Headphones
https://files.facepunch.com/daniel/1b2011b1/0OyFzoEgI6.png
LODs and Human aswell
CommandList.GetRenderTarget with SizeFactor, don't allocate DepthTexture for it since it's not being used anywhere yet
Overlay is considered a game layer since it draws to color, fixes depth prepass for overlays, remove overlay prepass from renderpipeline_standard
Optimze Pixmap.FromTexture (don't swizzle the format 3 times)
4096x4096 339ms -> 115ms
2048x2048 90ms -> 50ms
1024x1024 20ms -> 10ms
Bottleneck is going to be the data read from GPU -> CPU, not much else to do
Fixed an issue where FromHost sync vars could get stomped. Optimized delta snapshot updates - we no longer need to even try to process networked objects we don't own. Fixes Facepunch/sbox-issues#7261
Security check in snapshot processing - don't process snapshots we receive for an object if the source connection doesn't own it and isn't the host
Force add compiled VR menu scene
Stop "Create Sound Event" pranking people by opening to the wrong directory, resolves Facepunch/sbox-issues#7421
Move VRSceneSwitcher + add warning and move back to OnAwake, recompile main menu
In VR, menu defaults to having VR tag enabled
Merge branch 'master' into jsonfree-clone
In VR, menu defaults to having VR tag enabled
Move VRSceneSwitcher + add warning and move back to OnAwake, recompile main menu
Stop "Create Sound Event" pranking people by opening to the wrong directory, resolves Facepunch/sbox-issues#7421
Force add compiled VR menu scene
Fixed an issue where FromHost sync vars could get stomped. Optimized delta snapshot updates - we no longer need to even try to process networked objects we don't own. Fixes Facepunch/sbox-issues#7261
Remove unintended file change
Clear clone type cache on HotReload & GameShutdown
Documentation
Add TextureGenerator boilerplate
TextureControlWidget poc
Fix NRE in SpriteRenderer when texture is null
TextureControlWidget creates a child ResourceControlWidget instead of trying to be one
Draw texture preview
Add TextureGenerator boilerplate
TextureControlWidget poc
Fix NRE in SpriteRenderer when texture is null
TextureControlWidget creates a child ResourceControlWidget instead of trying to be one
Speed up Pixmap.FromTexture ( there's got to be a faster way than this come on)
Draw texture preview
Optimze Pixmap.FromTexture (don't swizzle the format 3 times)
4096x4096 339ms -> 115ms
2048x2048 90ms -> 50ms
1024x1024 20ms -> 10ms
Bottleneck is going to be the data read from GPU -> CPU, not much else to do
Don't run morph code when using vertex cache
Fix incorrect offset to CalculateMorphSubrectData