22,041 Commits over 1,583 Days - 0.58cph!
Fix exception when couldn't parse resource as json
Make agents follow gameobject position while in editor
Improve previous fix for NavAgent position glitching
Fix an issue where manually setting a NavMeshAgents position would result in race conditions at high framerates
For example, this manifested when using CreateBoneObjects on a SkinnedModelRenderer owned by the agent's GameObject.
Revert "Bindless lightmaps/Lightmap Combo Removal (#1765)"
This reverts commit 1fdcdeab689851f1093853faa8d8b4d6041d63f7.
# Conflicts:
# game/addons/base/Assets/postprocess/ObjectHighlight/objecthighlight.shader_c
# game/addons/base/Assets/shaders/atmosphere_sky.shader_c
# game/addons/base/Assets/shaders/blendable.shader_c
# game/addons/base/Assets/shaders/foliage.shader_c
# game/addons/base/Assets/shaders/fur.shader_c
# game/addons/base/Assets/shaders/gizmo/gizmo_grid.shader_c
# game/addons/base/Assets/shaders/gizmo/gizmo_line.shader_c
# game/addons/base/Assets/shaders/glass.shader_c
# game/addons/base/Assets/shaders/line.shader_c
# game/addons/base/Assets/shaders/lpv_debug.shader_c
# game/addons/base/Assets/shaders/sprite.shader_c
# game/addons/base/Assets/shaders/terrain.shader_c
# game/addons/base/Assets/shaders/terrain_brush.shader_c
# game/addons/base/Assets/shaders/terrain_preview.shader_c
# game/addons/base/Assets/shaders/tiled_light_culling_cs.shader_c
# game/addons/base/Assets/shaders/ui_backdropfilter.shader_c
# game/addons/base/Assets/shaders/ui_basic.shader_c
# game/addons/base/Assets/shaders/ui_borderwrap.shader_c
# game/addons/base/Assets/shaders/ui_cssbox.shader_c
# game/addons/base/Assets/shaders/ui_cssshadow.shader_c
# game/addons/base/Assets/shaders/ui_dropshadow.shader_c
# game/addons/base/Assets/shaders/ui_filter.shader_c
# game/addons/base/Assets/shaders/ui_text.shader_c
# game/addons/base/Assets/shaders/vertex_color.shader_c
# game/addons/base/Assets/shaders/water.shader_c
# game/core/shaders/black_unlit.shader_c
# game/core/shaders/cables.shader_c
# game/core/shaders/complex.shader_c
# game/core/shaders/complex_reflections.shader_c
# game/core/shaders/cs_volumetric_fog.shader_c
# game/core/shaders/debug_wireframe_2d.shader_c
# game/core/shaders/decal.shader_c
# game/core/shaders/depth_only.shader_c
# game/core/shaders/eyeball.shader_c
# game/core/shaders/generic.shader_c
# game/core/shaders/hair.shader_c
# game/core/shaders/post_process.shader_c
# game/core/shaders/projected_decals.shader_c
# game/core/shaders/projected_sheet_decals.shader_c
# game/core/shaders/simple.shader_c
# game/core/shaders/skin.shader_c
# game/core/shaders/sky.shader_c
# game/core/shaders/spritecard.shader_c
# game/core/shaders/static_overlay.shader_c
# game/core/shaders/tools_shading_complexity.shader_c
# game/core/shaders/tools_solid.shader_c
# game/core/shaders/tools_visualize_collision_mesh.shader_c
# game/core/shaders/tools_wireframe.shader_c
# game/core/shaders/ui.shader_c
# game/core/shaders/visualize_cloth.shader_c
# game/core/shaders/visualize_nav.shader_c
# game/core/shaders/visualize_physics.shader_c
# game/core/shaders/vr_tools_shading_complexity.shader_c
Build shaders
If we have any command line arguments from the Steam client (sbox.game -rungame), parse it via ISteamApps.GetLaunchCommandLine
Expose Application.ShutdownUnitTest()
Throws if not currently running a unit test
Make sure it doesn't run in headless (errors out on dedicated server)
Some tidy up - data table ReadFilter instead of other method, reset delta snapshot cache on owner change and after network refresh is received
Add Simulate Packet Loss alongside Simulate Lag in editor network options - it's working for simulating outgoing lost packets from the host right now
VR: Remove obsolete controller checking bools that nobody's using
VR: Add IsHandTracked bool to VRController, update fpxr to 5cf7ff24f5b157166102c8e4898bb84b4accb952
VR: Add MotionRange to VRController.GetJoints, update fpxr to 8822f0461709fbd2eda8fe004d51af79d47e6aa9
e.g.
```csharp
Input.VR.LeftHand.GetJoints( MotionRange.Hand ); // default
Input.VR.LeftHand.GetJoints( MotionRange.Controller ); // tries to wrap hands around the controller
```
VR: Better controller interactions in menu, move panel to a more comfortable height
Reapply "Bindless lightmaps/Lightmap Combo Removal (#1765)"
This reverts commit de7b93d17c7a036a567347794ca51163132ef42a.
Reapply BATCH_FLAGS_CONTROLLING_COMBO_CHANGES for legacy shaders, accidentally removed binding lightmap for legacy shaders
Initialize vertex output of lightmap uv when lightmapping is disabled
Update drivers with bindless lightmaps & amd fix
Humans/animgraph: added Sprint_NW & Sprint_NE
Don't accept "game" command while Application.IsEditor
Compute Shader Skinning (#1786)
Calculate skinning in compute shader instead of vertex shader
Compile shaders
Can now right click on a Shader to "Create Material" from it.
https://files.facepunch.com/CarsonKompon/2025/January/24_17-29-EmptyPony.png
Fix typo in MaterialMenu
add octohedral_encoding.fxc include
Forward+ Decals (#1606)
GPU driven tile culled decals that modify their surfaces PBR properties.
No additional draw calls for any decals.
* PBR modification: Albedo, Normal, Roughness, Metal, AO
* Works with transparent surfaces as it's not projecting based on depth
* Color Tinting + Opacity
* Angle attenuation
* Automatic sort order + override
* Future compataibility with extra data flags to add 100 more things
* Decal::Apply( ... ) API
Make shaders compile with Vulkan 1.2, allows for wave ops instructions used in new SSR, etc
Microsoft/DirectXShaderCompiler/wiki/Wave-Intrinsics
Bitch when variables are uninitialized in HLSL, can cause all sorts of weird undefined behavior in certain drivers
Fix warnings on all shaders, remove D_EYE_WHITE (bullshit?)
Avoid sampling diffuse cubemap for fog at lod0 to not have fireflies like in Eagle One Rain Demo
Disable compute skinning temporarily while descriptor set crash is being debugged
Mark used resources in buffered descriptor set a few frames in advance, they're being deleted while still used
Texture Generators (#1779)
* Add ResourceGenerator
* Add ResourceGeneratorContext
* Add TextureGenerator
* Add Bitmap
* Add Sandbox.Utility.ForAsync
* Add IPopupEditor<T>, EditorUtility.OpenControlSheet looks for this interface when creating a popup
* Rename ControlSheetPopup to PopupEditor,
* Add Color.Rgba16 (half based color)
* Managed can override compiling of any resource
* Add Texture.GetBitmap
* Add transient filesystem in editor
* Add Texture.IsError
* Add Margin.IsNearlyZero
* Fix asset picker ignoring AdditionalTypes
* Add Widget.GetDescendants<T>
* Add MainThread.Wait()
* Expose TypeDescription.Order
Fix Json exception when compiling texture
Fix NRE in CreateBoneObjects
Add VTexWriter - clean up the texture compile process
In FloatBitMap_t::Pixel(, clamp the sample
Allow non power of 2 textures in native compiletexture
Update stb_dxt.h
Add Bitmap.IsOpaque()
Don't use stb for dx5 it's shit
Automatically work out texture compression format
Merge branch 'master' into json-free-clone2
Add VTexWriter - clean up the texture compile process
In FloatBitMap_t::Pixel(, clamp the sample
Allow non power of 2 textures in native compiletexture
Update stb_dxt.h
Add Bitmap.IsOpaque()
Don't use stb for dx5 it's shit
Automatically work out texture compression format
Fix Json exception when compiling texture
Fix NRE in CreateBoneObjects
Texture Generators (#1779)
* Add ResourceGenerator
* Add ResourceGeneratorContext
* Add TextureGenerator
* Add Bitmap
* Add Sandbox.Utility.ForAsync
* Add IPopupEditor<T>, EditorUtility.OpenControlSheet looks for this interface when creating a popup
* Rename ControlSheetPopup to PopupEditor,
* Add Color.Rgba16 (half based color)
* Managed can override compiling of any resource
* Add Texture.GetBitmap
* Add transient filesystem in editor
* Add Texture.IsError
* Add Margin.IsNearlyZero
* Fix asset picker ignoring AdditionalTypes
* Add Widget.GetDescendants<T>
* Add MainThread.Wait()
* Expose TypeDescription.Order
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
Standardize internal way to async replace placeholder textures
Add Sandbox.Utility.ForAsync
TextureGenerators are async
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
Clean up TextureControlWidget
Add Color.Rgba16 (half based color)
Add Bitmap class
More bitmap stuff
Bitmap draw and bitmap pen
Bitmap drawing fixes
Bitmap clone, IDisposable, IValid
Wrap IResourceCompilerContext
Find "$compiler" in resource json and launch compiler
Add more ResourceCompiler functionality
Managed can override compiling of any resource
Add Texture.GetBitmap
Simple texture compiling from managed
Add Bitmap.ToFormat( ImageFormat format )
Add TextureBuilder.WithMips() - auto mip count
Bitmap.ToTexture supports mipmaps
ResourceCompiler.Compile is async (but we have to run it syncronously)
ResourceCompiler,. ResourceCompilerContext are in Engine
Add transient filesystem
Add Texture.IsError
Compile embedded textures to transient folder
Double height texturcontrolwidget
Remove debug
Add Bitmap.DrawText
Clean up
Lock FontManager cache when accessing
Refactor
Generated resources get weak cached in memory for re-use
Cleanup floatbitmap, add LoadFromInMemoryTGA
Load Bitmap.CreateFromBytes supports tga
Better tooltips on TextureControlWidget
Don't support mipmaps if npot (until we figure out how/why)
Create Bitmap.Filters.cs
Bitmap supports psd loading
Fix a bunch of bitmap filters
Add Margin.IsNearlyZero
Fix blur/sharpen thinking the edge of the bitmap is the end
Control widget tweaks
Pass ResourceCompiler in ResourceGenerator options, allowing us to add references
Fix asset picker ignoring AdditionalTypes
Move ColorTextureGenerator
Move RandomTextureGenerator to engine, allow normals creation
Add Widget.GetDescendants<T>
Expose OpenColorPopup on ColorControlWidget
Add [TextureImagePath] - allows selecting an image or a texture
Don't cache resource if hash changed while generating
Expose CreateEmbeddedResource on TextureResource
Bitmap.Rotate resizes the texture
TextureControlWidget has shortcut buttons for selecting a file, or color
Add bitmap SVG loader
Return white for default colors, instead of transparent
Add MainThread.Wait()
Add EngineFileSystem.Mounted (!)
Create TextTextureGenerator.cs
Create RadialGradientTextureGenerator.cs
Create LinearGradientTextureGenerator.cs
Create ImageFileTextureGenerator.cs
Expose Svg texture generator
Expose TypeDescription.Order
TextTextureGenerator tweaks
Fix warnings and errors
Use classname when setting ResourceGenerator
Fix bitmap.clear not using floating point color
Fix NRE in ImageFileTextureGenerator
Mark used resources in buffered descriptor set a few frames in advance, they're being deleted while still used
Disable compute skinning temporarily while descriptor set crash is being debugged
DepthNormalPrepassLayer stub, DepthNormal shader class consumes from S_MODE_DEPTH
DepthNormals mode, uses values directly instead of Material, attach it to ShadingModels
Ignore and don't compile combo if it's not referenced by a mode or feature instead of erroring out, e.g. We want to reference DepthNormal.hlsl everywhere in Class.hlsl, but we want to only have combos for it if we're using a DepthNormal mode without complicating the codebase, this way when adding a new mode that references that combo, it's added to the shader without convoluting the source, argue with me if you think this is shit behavior
Temp bind FindOrCreateRenderTarget and use managed rendertarget for depthnormalprepasslayer
Should be continue rather than break, fix undefined identifier if S_MODE_DEPTH_NORMAL is not set
Pass MSAA value from pipeline, make DepthNormals a dynamic combo instead of a mode, conditional
Add Normals.hlsl, with fallback if no depthnormals are available, add Bindless::GetTexture2DMS
Adjustments, Depth Prepass Depth Only under a convar, do depthnormals without size cull threshold
GTAO uses Normals::Sample() instead of recalculating normals from depth
https://files.facepunch.com/sampavlovic/1b1711b1/sbox-dev_e5dHGELNmU.mp4
Make shaders compile with Vulkan 1.2, allows for wave ops instructions used in new SSR, etc
Microsoft/DirectXShaderCompiler/wiki/Wave-Intrinsics
Bitch when variables are uninitialized in HLSL, can cause all sorts of weird undefined behavior in certain drivers
Fix warnings on all shaders, remove D_EYE_WHITE (bullshit?)
Avoid sampling diffuse cubemap for fog at lod0 to not have fireflies like in Eagle One Rain Demo
Forward+ Decals (#1606)
GPU driven tile culled decals that modify their surfaces PBR properties.
No additional draw calls for any decals.
* PBR modification: Albedo, Normal, Roughness, Metal, AO
* Works with transparent surfaces as it's not projecting based on depth
* Color Tinting + Opacity
* Angle attenuation
* Automatic sort order + override
* Future compataibility with extra data flags to add 100 more things
* Decal::Apply( ... ) API
Clean up, remove unused properties, destroy buffer, 64 decals per screen tile
Forward+ Decals
GPU driven tile culled decals that modify their surfaces PBR properties.
No additional draw calls for any decals.
* PBR modification: Albedo, Normal, Roughness, Metal, AO
* Works with transparent surfaces as it's not projecting based on depth
* Color Tinting + Opacity
* Angle attenuation
* Automatic sort order + override
* Future compataibility with extra data flags to add 100 more things
* Decal::Apply( ... ) API
add octohedral_encoding.fxc include
Can now right click on a Shader to "Create Material" from it.
https://files.facepunch.com/CarsonKompon/2025/January/24_17-29-EmptyPony.png
Fix typo in MaterialMenu
GraphCompiler will now resolve inputs for parameters within subgraphs
Make sure DefaultEditor draws the correct Default Value
GraphCompiler now pulls the Default Value set on a SubgraphNode if input has no connection
Fix infinite loop when saving some graph configurations
Cleanup GraphCompiler.Result() and remove debug logs
Fix DefaultEditor NRE
Label default properties as "Default {x}"
Fix Subgraph preview not compiling properly after new changes to GraphCompiler
Use classname when setting ResourceGenerator
Fix bitmap.clear not using floating point color
Fix NRE in ImageFileTextureGenerator
Add some more comments for things that will get removed once we delete the old undo system.
Expose UndoScope via Scene.Editor
Fix Typo
Fixed nesting issues with GraphCompiler and subgraphs
ShaderGraph GraphCompiler can now resolve the results of Subgraph nodes (only in a few cases at the moment)
GraphCompiler now resolves nodes referenced in NodeResult.Func outputs when in subgraphs appropriately
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
Standardize internal way to async replace placeholder textures
Add Sandbox.Utility.ForAsync
TextureGenerators are async
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
Clean up TextureControlWidget
Add Color.Rgba16 (half based color)
Add Bitmap class
More bitmap stuff
Bitmap draw and bitmap pen
Bitmap drawing fixes
Bitmap clone, IDisposable, IValid
Wrap IResourceCompilerContext
Find "$compiler" in resource json and launch compiler
Add more ResourceCompiler functionality
Managed can override compiling of any resource
Add Texture.GetBitmap
Simple texture compiling from managed
Add Bitmap.ToFormat( ImageFormat format )
Add TextureBuilder.WithMips() - auto mip count
Bitmap.ToTexture supports mipmaps
ResourceCompiler.Compile is async (but we have to run it syncronously)
ResourceCompiler,. ResourceCompilerContext are in Engine
Add transient filesystem
Add Texture.IsError
Compile embedded textures to transient folder
Double height texturcontrolwidget
Remove debug
Add Bitmap.DrawText
Clean up
Lock FontManager cache when accessing
Refactor
Generated resources get weak cached in memory for re-use
Cleanup floatbitmap, add LoadFromInMemoryTGA
Load Bitmap.CreateFromBytes supports tga
Better tooltips on TextureControlWidget
Don't support mipmaps if npot (until we figure out how/why)
Create Bitmap.Filters.cs
Bitmap supports psd loading
Fix a bunch of bitmap filters
Add Margin.IsNearlyZero
Fix blur/sharpen thinking the edge of the bitmap is the end
Control widget tweaks
Pass ResourceCompiler in ResourceGenerator options, allowing us to add references
Fix asset picker ignoring AdditionalTypes
Move ColorTextureGenerator
Move RandomTextureGenerator to engine, allow normals creation
Add Widget.GetDescendants<T>
Expose OpenColorPopup on ColorControlWidget
Add [TextureImagePath] - allows selecting an image or a texture
Don't cache resource if hash changed while generating
Expose CreateEmbeddedResource on TextureResource
Bitmap.Rotate resizes the texture
TextureControlWidget has shortcut buttons for selecting a file, or color
Add bitmap SVG loader
Return white for default colors, instead of transparent
Add MainThread.Wait()
Add EngineFileSystem.Mounted (!)
Create TextTextureGenerator.cs
Create RadialGradientTextureGenerator.cs
Create LinearGradientTextureGenerator.cs
Create ImageFileTextureGenerator.cs
Expose Svg texture generator
Expose TypeDescription.Order
TextTextureGenerator tweaks
Fix warnings and errors
Add bitmap SVG loader
Return white for default colors, instead of transparent
Add MainThread.Wait()
Add EngineFileSystem.Mounted (!)
Create TextTextureGenerator.cs
Create RadialGradientTextureGenerator.cs
Create LinearGradientTextureGenerator.cs
Create ImageFileTextureGenerator.cs
Expose Svg texture generator
Expose TypeDescription.Order
TextTextureGenerator tweaks
Fix warnings and errors
Pass ResourceCompiler in ResourceGenerator options, allowing us to add references
Fix asset picker ignoring AdditionalTypes
Move ColorTextureGenerator
Move RandomTextureGenerator to engine, allow normals creation
Add Widget.GetDescendants<T>
Expose OpenColorPopup on ColorControlWidget
Add [TextureImagePath] - allows selecting an image or a texture
Don't cache resource if hash changed while generating
Expose CreateEmbeddedResource on TextureResource
Bitmap.Rotate resizes the texture
TextureControlWidget has shortcut buttons for selecting a file, or color
Throw when trying to destroy uninstantiated prefab
Handle references in prefab variables to prefab root differently
Compute Shader Skinning (#1786)
Calculate skinning in compute shader instead of vertex shader
Only find this attribute if we need it
SyncFlags.Interpolate, support for float, Vector3, Angles, Rotation, Transform (with internal interface right now)
Fix blur/sharpen thinking the edge of the bitmap is the end
Control widget tweaks
Don't accept "game" command while Application.IsEditor
Don't accept "game" command while Application.IsEditor
Bitmap supports psd loading
Fix a bunch of bitmap filters
Add Margin.IsNearlyZero
MeshTools: Refresh Pivot after undo/redo
Rename to be more inline with other scopes (e.g. Gizmo.Scope)
Less verbose flag name
Less verbose UndoScope initialization & capture selections by default.
Precompute vertex layout offsets and bits in rendermesh instead of doing it every compute dispatch, as valve comments suggest
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
Standardize internal way to async replace placeholder textures
Add Sandbox.Utility.ForAsync
TextureGenerators are async
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
Clean up TextureControlWidget
Add Color.Rgba16 (half based color)
Add Bitmap class
More bitmap stuff
Bitmap draw and bitmap pen
Bitmap drawing fixes
Bitmap clone, IDisposable, IValid
Wrap IResourceCompilerContext
Find "$compiler" in resource json and launch compiler
Add more ResourceCompiler functionality
Managed can override compiling of any resource
Add Texture.GetBitmap
Simple texture compiling from managed
Add Bitmap.ToFormat( ImageFormat format )
Add TextureBuilder.WithMips() - auto mip count
Bitmap.ToTexture supports mipmaps
ResourceCompiler.Compile is async (but we have to run it syncronously)
ResourceCompiler,. ResourceCompilerContext are in Engine
Add transient filesystem
Add Texture.IsError
Compile embedded textures to transient folder
Double height texturcontrolwidget
Remove debug
Add Bitmap.DrawText
Clean up
Lock FontManager cache when accessing
Refactor
Generated resources get weak cached in memory for re-use
Cleanup floatbitmap, add LoadFromInMemoryTGA
Load Bitmap.CreateFromBytes supports tga
Better tooltips on TextureControlWidget
Don't support mipmaps if npot (until we figure out how/why)
Create Bitmap.Filters.cs
Disabling D_SKINNING and D_MORPH when D_CS_VERTEX_ANIMATION is enabled would be a mistake because it would break older compiled shaders
Cleanup floatbitmap, add LoadFromInMemoryTGA
Load Bitmap.CreateFromBytes supports tga
Better tooltips on TextureControlWidget
Don't support mipmaps if npot (until we figure out how/why)
Create Bitmap.Filters.cs
Remove this toolvis shit from skinning compute, I don't think it's needed
These newer decompress normal functions can be removed, we're not using them yet
Remove SV_VertexID from depth_only
use shader_c from master, these somehow got fucked
Add octohedral_encoding.fxc
Add skinning_cs.shader
Try and use animated vertex cache when D_CS_VERTEX_ANIMATION is enabled
Store vb size offsets in rendermesh
Create GPU buffers for skinned vertex cache and vertex cache offsets
Dispatch requested vertex cache updates
Animatables requests vertex cache updates
Compile shaders
Make sure both buffers are destroyed
Add SV_VertexID to VS_INPUT, this can be used for indexing vertex cache instead of using D_MORPH nVertexIndex
Don't call CalculateInstancingObjectToWorldMatrix when using D_CS_VERTEX_ANIMATION, it's already calculated in the cache
Decode cached vertex normals and tangents
Compute morphs, normals and tangents in skinning compute shader
Define MORPH_TEXTURE_ATLAS_WIDTH as g_nMorphTextureAtlasWidth when in compute
Fix incorrect offset to CalculateMorphSubrectData
Don't run morph code when using vertex cache
Compile shaders
Use remaining bytes in extra shader data to hold base vertex cache offset, add another vertex id lookup buffer relative to meshes vertex buffer size offsets - this allows correct indexing into cached vertices while remaining backwards compatible
Compile shaders
Resize vertex cache buffer when out of space
Use descriptor set for vertex cache so that it doesn't need to be set with an attribute (which would be set too early if resize is needed)
Compile shaders
Fix decompressing normals in skinning compute shader
Add back vertex cache request batching now we know everything works