* Use Hilbert Index instead of Blue Noise for GTAO, same as the original paper, allows us to have better quality with less work, GTAOPasses::DenoiseSpatial does two pixels for one thread
* Force Float16 for GTAO, good speedups on modern GPUs, default behaviour from reference implementation, do explicit casts to supress warnings
* More accurate MSAAUtils::GetSampleIndex https://files.facepunch.com/sampavlovic/1b2611b1/image.psd.png
* adjustments
* reduce blending for non-edge pixels to preserve more details instead of using the raw amount at edges
* Early out here, no good way to have a non uniform size dispatch yet, should still keep 2x spatial speedup
* Remove unused comment
* update shaders
* Added explicit StopCurrentRenderPass() before all transfer ops
vkCmdCopyImage / vkCmdPipelineBarrier / vkCmdBlitImage / vkCmdResolveImage cannot be called inside a render pass and would report VUID-vkCmdXXX-renderpass validation errors
* Only bind RenderTargets when we actually have any
Prevents loading defaults which can cause validation errors
* Add missing state transitions for DoF and Bloom
So they don't interrupt the renderpass with an implicit transition via StopCurrentRenderPass.
* SetupForDraw() early return when render area is 0
Avoid VUID-VkRenderingInfo-None-08994 - Zero-extent render
Happened when minimizing / resizing
* Set correct mip level when binding and transitioning render targets
Could cause VUID-VkImageMemoryBarrier-oldLayout-01197 for render targets
And VUID-vkCmdDraw-None-09600 when rendering cube maps
* Remove unnecessary static singletons in MainMenu code
* Empty SceneWorld delete queues during shutdown
* Dresser cancel async load operation on destroy
* Use reflection to null references to static native resources on shutdown
This way we don't have to remember doing this manually.
* Fix SoundOcclusionSystem using static lists to reference resources
* Sound System: Use weak references to refer to scenes
* Cleanup static logging listeners that kept strong refs to panels
* UISystem Cleanup, make sure all panel/stylesheet refs are released
* RenderTarget and RenderAttributes shutdown cleanup
* Rework AvatarLoader, ThumbLoader & HTTPImageLoader Cache
First try to go through ResourceLibrary.WeakIndex which might already hold the texture.
If there is no hit, go through a second cache that caches HTTP & Steam API response bytes instead of textures.
We want to cache the response bytes rather than the actual Texture, so stuff cached sits in RAM not VRAM.
Before avatars and thumbs would reside in VRAM.
* Fix rendertarget leak in CommandList.Attr.SetValue
GetDepthTarget() / GetColorTarget() return a new strong handle (ref count +1).
We need to DestroyStrongHandle() that ref. So handles don't leak.
* Call EngineLoop.DrainFrameEndDisposables before shutdown
* NativeResourceCache now report leaks on shutdown
* Override Resource.Destroy for native resources, kill stronghandles
* Deregister SceneWorld from SceneWorld.All during destruction
* Ensure async texture loading cancels on shutdown
* SkinnedModelRender bonemergetarget deregister from target OnDisabled
* Clear shaderMaterials cache during shutdown
* Refactor Shutdown code
Mostly renaming methods from Clear() -> Shutdown()
Adding separate GlobalContext.Shutdown function (more aggressive than GlobalContext.Reset).
Clear some static input state.
* Deregister surfaces from Surface.All in OnDestroy
* RunAllStaticConstructors when loading a mount
* Advanced managed resource leak tracker enabled via `resource_leak_tracking 1`
Works by never pruning the WeakTable in NativeResourceCache.
So we can check for all resources if they are still being held on to and log a callstack.
* Start moving SSR to bindless
* Classify pass stub
* Separable bilateral upscale, 0.3ms > 0.08ms, not happy with it still
* start classify and intersect indirect
* Commandlist support for UAV barriers and clearing a texture and gpubuffer
* Simplify this, move classify to it's own shader
* All indirect
* ResourceState.IndirectArgument missing from ResourceStateToVulkanFlags switch
* Fix indirect, all works
* classify doesnt get skybox
* Add Clear method to CommandList for clearing render target colors
* bilateral upscale indirect too
* Cleanup
* Simplify bilateral upscale, With RADIUS=1, separable saves only 3 taps (6 vs 9), but costs 3 barriers + shared memory + atomics — the synchronization overhead far exceeds 3 extra texture loads of doing it with a normal X Y loop
* Dotnet format, increase roughness threshold (we can afford it 😘 ) and dont need to discard these buffers on disable
* compile shaders
* this shouldnt be a property
* Add FillGPUBuffer method for efficient buffer filling using native GPU commands
* Make SpriteBatchSceneObject shaders static, so we don't create them per instance
* Avoid per frame shader/material creation in PostProcessing
* Avoid per frame shader/material creation in HudPainter
* Move a few more compute shaders into static members
* Reduce allocations in NormalizeFilename
* Reduce string allocations in Material.FromShader
* Fix SSR not reprojecting correctly and drifting on downsample, reference original code and backport some of the stuff from motion vectors too, major cleanup
* Logic for RenderTarget.GetTemporary probably shouldn't ceil, causes a lot of drifting in SSR even though the logic is correct, can see downsampling up to 10 and still remaining sharp
https://files.facepunch.com/sampavlovic/1b2511b1/sbox-dev_dB9j5ipUTA.mp4
* Barriers are very strict on Intel ARC, make them explicit for SSAO and SSR, while at it make this logic for SSR simpler
For reference this is how it could appear on Intel ARC B580
https://files.facepunch.com/sampavlovic/1b2511b1/sbox-dev_UjkEGVD4k4.mp4
* CommandList.ResourceBarrierTransition for Textures/RenderTargets
* Fix Reflections_GetHitPositionReprojection while being aware of Motion::Get for future Motion Vector API, deal with temporal stability better
https://files.facepunch.com/sampavlovic/1b2811b1/sbox-dev_He8gAbtPau.mp4
* Build shader
* Format