1,109 Commits over 1,219 Days - 0.04cph!
Move all terrain attributes into 1 structured buffer, create a Terrain class any shader can use to provide things like Terrain::GetHeight( worldPos )
Use an AssetPicker for browsing terrain materials instead
UI: Do not render invalid texture background images
Fix missing map select button
Disallow np2 textures, crashes the DXT compressor we use, plus disables mips etc.
CRenderDeviceBase::AsyncSetTextureData2: Fix nullptr crash with invalid rects
Don't completely fail to start with an invalid controller plugged in, needs to be properly fixed in C++ though
Terrain: Add Hole tool
This is a seperate R8 texture currently, but will be JsonUpgrade and folded
once the splat map becomes an index map.
https://files.facepunch.com/matt/1b2111b1/0pGQXMLbc2.png
Browse cloud terrain materials button
Can drop terrain materials onto terrain in scene
Terrain Materials accept dragged cloud assets
TerrainMaterialList: Double clicking a material opens its editor (single click selects for use still)
Terrain settings hide Collider properties which we force, can we have Terrain not inherit these at all @aylaylay
Terrain: larger default clipmap extents (fine but can be smarter without a clod mesh), remake clipmap mesh on dirty properties
Terrain: Add MaterialOverride for custom shaders using terrain shader api
DynamicSceneObject: AddVertex( Span ) should not accept a count, internalize ptr only method, VertexSceneObject adds range
Reverse Z (#1581)
Every other modern engine uses a reversed depth buffer,
Unity DX11+
UE4+
Godot
It brings a massive improvement to depth buffer precision helping to prevent z-fighting and other depth precision issues.
Source 2 has always had support for it but was not forced because of DX9.
We should have turned this on long ago and will have to rip the band aid off at some point. It will break peoples custom shaders.
The other ways their shaders would break that I'm unsure if we could provide compatability are rare:
Interact with the depth buffer directly or through Depth::Get etc.
Perform operations in clip space like gizmo_grid.shader does.
I don't see why we'd ever change clip space direction again after this.
EditorPreferences.CameraZNear minimum range 1 please stop
Resolves Facepunch/sbox-issues#5696
Box select works in ToolVis modes (ui_cssbox shader)
Resolves Facepunch/sbox-issues#5699
Fix CSceneSystem::DownsampleTexture trying to make a 0 width/height mip
Add facepunch.hc1 to tests
Restore obsolete Gizmo.HitBox.Model function signature to maintain compatibility
▌▌▄▊▄▇ ▉█▉▊▆▌▋▆▍ ▅▅▊▅▌▄▅▌█▇▊▍▋▅▍, ▆▍█'▊ ▄▆█▍ ▋▋▍ ▊▅█▉▌ ▆▍ ▊▋█▅ ▅▊▄ ▊▍▊
ModelRenderer: Remove OnPreRender again, if this was hacking around something fix the root cause
Replace AudioListener.OnPreRender
Optimize NativeResourceCache.Tick() - was taking up to 0.25ms some frames
Add [Range( 1, ... )] to Camera.ZNear and Camera.ZFar, update docs. Seen a couple 0.01 inch znear cameras with insane z fighting today
VoiceManager: GetAvailableVoice before GetVoice, otherwise it's 0.1ms every frame (even when not speaking)
Why would we need to set LightCookie to null on a destroyed light. Resolves Facepunch/sbox-issues#5664
Whitelist Delegate equality operators resolves Facepunch/sbox-issues#5658
Whitelist DependentHandle resolves Facepunch/sbox-issues#5660
Temporary RTs always have a UAV binding so you can use them with compute shaders
SSAO: Use RenderTarget.GetTemporary instead of manual texture allocations
Delete WorldPanel immediately OnDisabled, otherwise it will linger forever when play mode is stopped
Correct place for these SceneObject sealed overrides
Clear all these ptrs first to be safe, seal some more shit
VoiceComponent.PushToTalkInput mark with InputAction attribute
TextRenderer remove Text2 test property
Don't keep sounds that failed to load around trying to mix forever (matches how old vmix mixer handles it) Fixes #1597
Hightlight.RenderEffect: Use Scene.GetAllComponents instead of iterating every gameobject ( closes #1597 )
Codegen should shit itself if you don't use a string literal from Cloud.Asset() methods
Terrain: Add height blend settings, add per material height and normal strength, various other polishing
Hide GameResource.ResourceVersion
TerrainMaterialList: Allow drops properly
Editor post processing toggle closes #1587
SteamLobbySocket caches owner, calling SteamMatchmaking.GetLobbyOwner each tick had significant impact
Expose Terrain size properties to settings sheet
New TerrainMaterial & TerrainStorage resources, rework creation of terrain, component custom editor, simple height blends and various QOL improvements
New TerrainMaterial asset, can be used on multiple terrains, copied from other projects
* Replaces TerrainData.TerrainLayer which used manual packed vtex files
* Accepts source images for: albedo, normal, rough, ao, height
* Compiles into 2 generated vtex_c
* Contains other properties for metalness, uv scale, uv rotation
* AssetPreview is used for editor UX too, instead of hacky shit before
* TerrainMaterialEditor auto populates _normal _rough etc. properties from albedo
* Drag drop TerrainMaterial assets into Terrain component
* Open for expansion to grass/clutter properties
TerrainStorage
* Replaces TerrainData & TerrainDataFile
* Make use of IJsonConvert to avoid all the crazy crap I was doing before
* Drag drop TerrainStorage asset into scene
* JsonUpgrader for TerrainData -> TerrainStorage, resmaples ^2+1 heightmaps to just ^2
Terrain component editor:
* Support creating or linking TerrainStorage if none is attached
* Split settings into its own tab
* Add heightmap resampling for non pow2 heightmaps
* Add import splatmap
* Terrain creation no longer forced through GameObject menu, remove Hide attribute from Terrain component.
* Remove special terrain save logic from SceneEditorSession, use scene.saved editor event
* Texture streaming works properly
* Basic height blend
* Disable specular on terrain
Reverse Scene isEditor constructor so GameObjectSystem constructor is aware of editor scenes
▋▆█▄▅▍▋ ▉▆█▉▄▌▌▌▅ ▍▉▊▉▉▅ ▍▊ ▋▌█▍▆▆▉.▆▉▆▌█▋ ▍▌▊▄ ▄▋█▉▋▊▊ ▅▋▋▍ ▉▆▄▊▇▌▇ ▇▉▋▇
▄▌-▇█▉▄█▇▄▊-▄█: █▇█▄▄ ▅▋▌▉ <█▉▊▇▆.▅▄▍▊@▉▄▇▋▋▉▆▆▄▊▋▇▋▇▉▋.▊▇▌>
TextRenderer: Add TextAlign, FontWeight, FontControlWidget, remove OnPreRender
AssetInspector supports multiedit GameResource - resolves #5532
ScreenPanel should render ZIndex lowest to highest, matching all other UI behaviour - fixes Facepunch/sbox-issues#5462
SkyBox2D protect against null skybox - fixes Facepunch/sbox-issues#5569
Multi-edit works on [TextArea] properties - fixes Facepunch/sbox-issues#5556
Library projects get base project reference, matches compiler - fixes Facepunch/sbox-issues#5547
.gitignore: wanna keep these launchSettings local
Clear up these ".vfx" references to avoid confusion
ColorGrading: Expose to TypeLibrary, make properties public so inspector can find them (Engine classes are exposed differently than classes in projects)
Compiled ColorGrading shader
ColorGrading: Don't need these private enums, they map 1:1 with the public
Revert "Fuck knows why I did this, seems to be causing problems now" - Fucked on AMD. It'll be easier to debug when we're not rendering backwards in NativeRenderingWidget
Fuck knows why I did this, seems to be causing problems now
Fix Razor panels erroring when using <style> tags. All code paths are already relative since CodeArchive changes. Fixes Facepunch/sbox-issues#5528
DragAssetData.Parse: Resolve local asset before attempting to make it a package ident
Material API specular obeys S_SPECULAR same as Valve's PS_FinalCombinerDoLighting (you can now turn it off)
Graphics.PrepareTextureForUse -> Texture.MarkUsed (Doesn't need a graphics context now)
Json.SerializeAsObject (GameResource serialization) supports [JsonInclude] on non public properties. Deserialization already supported it.
Don't cache null types in AssetType.FromExtension. Fixes GameResource assets not appearing in projects that use libraries.
Fixes Facepunch/sbox-issues#5498
vtf project unused
Save Scene default path is assets path
README: Link to docs, remove old docs, unrequired prerequisite
Remove ModelRenderer.OnPreRender, use Transform.OnTransformChanged
BufferedHashSet: Add removes from removals queue & Remove removes from additions queue