userSam Pavloviccancel

1,819 Commits over 1,491 Days - 0.05cph!

2 Months Ago
Fix AO compositing for custom shaders https://files.facepunch.com/sampavlovic/1b2111b1/CRqx99maFj.png Add compiled shaders for AO including for Material shaders
2 Months Ago
Remove aoproxies ambient occlusion, it never looked too right and it's stupid to have artists authoring them manually, almost no one did I still think SDF AO works better than SSAO in most cases, but they should live as a renderhook and artists don't need to touch anything, the way it is now is very hard to maintain, it could be 10x simpler VrMonitor goes long unused since we removed SceneMonitor & VR Multiview Replace AO on shader with a single, non-directional AO but that composites properly, older shaders wont have incompatibility problems, also makes Dynamic Reflection work without ao AO on lighting pass GTAO stub, remove sdf.hlsl (until we meet again 🫡 ) Iterate gtao Iterate GTAO Iterate GTAO Calculate gtao depth and normals properly, use inverted depth for gtao Iterate GTAO, use built in uint encoding for passes, all 3 passes work, workaround for dxc compiler bug with dot product with half floats Remove old SDF functions entirely (byebye) Iterate GTAO, works almost perfectly ingame, add noise function to it [pick] Add Motion.hlsl for motion vectors Iterate GTAO, start deoising, remove unused shit, fix bug with binding too many textures on the lexer Update texture formats and remove unused code Shitty TAA, smeary but iteratable with bbox clamping, add thin occluder compensation Proper TAA, option for spartial or temporal blur SampleScreenSsMSAA to composite non-MSAA screen effects ( SSR, AO, etc ) into an MSAA buffer https://files.facepunch.com/sampavlovic/1b1711b1/05csVIYZJM.png Add multibounce ambient occlusion (but keep it disabled for now) https://files.facepunch.com/sampavlovic/1b1811b1/UckNYcRubO.png Adjust AO intensity, separate passes, add spartial/temporal passes, adjust thin compensation to become thickness Add generic TAA filter to Motion.hlsl Sensible defaults and final tweaks Fix depth normalization on XeGTAO, add better TAA values for AmbientOcclusion
2 Months Ago
Fix depth normalization on XeGTAO, add better TAA values for AmbientOcclusion
2 Months Ago
Sensible defaults and final tweaks
2 Months Ago
Add generic TAA filter to Motion.hlsl
2 Months Ago
Add multibounce ambient occlusion (but keep it disabled for now) https://files.facepunch.com/sampavlovic/1b1811b1/UckNYcRubO.png Adjust AO intensity, separate passes, add spartial/temporal passes, adjust thin compensation to become thickness
2 Months Ago
SampleScreenSsMSAA to composite non-MSAA screen effects ( SSR, AO, etc ) into an MSAA buffer https://files.facepunch.com/sampavlovic/1b1711b1/05csVIYZJM.png
2 Months Ago
Proper TAA, option for spartial or temporal blur
2 Months Ago
Shitty TAA, smeary but iteratable with bbox clamping, add thin occluder compensation
2 Months Ago
Update texture formats and remove unused code
2 Months Ago
[pick] Add Motion.hlsl for motion vectors Iterate GTAO, start deoising, remove unused shit, fix bug with binding too many textures on the lexer
2 Months Ago
Remove old SDF functions entirely (byebye) Iterate GTAO, works almost perfectly ingame, add noise function to it
2 Months Ago
Iterate GTAO, use built in uint encoding for passes, all 3 passes work, workaround for dxc compiler bug with dot product with half floats
2 Months Ago
Calculate gtao depth and normals properly, use inverted depth for gtao
2 Months Ago
Remove overriding SkyIndirectLighting to false in hammer maps, a lot of public maps are built without lighting and rely on IBL to have ambient lighting, we don't have a good way to tell if a map has baked lighting on MapLoader, better to just keep this on and let artist elect if they want IBL lighting by themselves
3 Months Ago
Add experimental r_tiled_rendering_conservative_culling so people can play with it, uses near-z approach for tiled culling for even better perfomance, doesn't play well with translucents, will be deprecated when we have two sets of light lists
3 Months Ago
Don't do OnDisabled(); OnEnabled() on Skybox2D dirty but clean up probe cleanly if needed
3 Months Ago
Test tl, tr, bl and br corners instead of updownleftright for cone frustum culling
3 Months Ago
Tiled Frustum Culling (#1669)
3 Months Ago
SkyBox2D Indirect Lighting ( Reflections/IBL ) can be toggled, hammer maps don't expect skyboxes to be used for lighting since it has vrad
3 Months Ago
Be more conservative by testing 4 points of cone base rather than a sphere shape
3 Months Ago
Tiled Frustums Start moving tiled_light_culling to use frusta Iterate frustum tiled culling Near/far tiled frustum planes Very simple ConeIntersect and AABBIntersect Cubemap frustum cullinng Show cubemap complexity on tiled debug vis as well https://files.facepunch.com/sampavlovic/1b2911b1/HM0UBknyYv.png Set up things to use worldSpaceNear to fix orthographic rendering with tiled rendering, use depth min/max for building tiled frustums https://imgur.com/a/tybd5Dv Fix ortho projection for CalculateScreenTiles fix DepthMinMax on ortho projections, fixes tiled lights on ortho projections https://files.facepunch.com/sampavlovic/1b3011b1/ZiyxdtwHc1.png Delete tiled_frustums_cs, main shader does everything, we recalculate it every frame anyway since we also match the depth chain for the far plane, can store it later again from it if we need it for anything Transform plane directly to local instead of using inverse matrix Light.GetInvertedRadius() not used anywhere, let's make it Light.GetRadius() Push radius changes to lightbinner.hlsl Fix frustum calculation so it wouldnt mess up with low farz, fix FetchDepthMinMax Using invprojrow3 to linearize depth feels a bit incorrect specially when moving far-z use correct algorithm, can be accelerated later Depth Near-Far was inverted on tiled_culling, perfect for both near/far planes now Allow using conservative near-z culling with D_CONSERVATIVE_CULLING and remove elegibility of D_DEPTH_PREPASS, we always have it https://i.imgur.com/9UlrmTc.png https://i.imgur.com/joEz72S.png
3 Months Ago
Allow using conservative near-z culling with D_CONSERVATIVE_CULLING and remove elegibility of D_DEPTH_PREPASS, we always have it https://i.imgur.com/9UlrmTc.png https://i.imgur.com/joEz72S.png
3 Months Ago
Using invprojrow3 to linearize depth feels a bit incorrect specially when moving far-z use correct algorithm, can be accelerated later Depth Near-Far was inverted on tiled_culling, perfect for both near/far planes now
3 Months Ago
Fix frustum calculation so it wouldnt mess up with low farz, fix FetchDepthMinMax
3 Months Ago
Push radius changes to lightbinner.hlsl
3 Months Ago
Light.GetInvertedRadius() not used anywhere, let's make it Light.GetRadius()
3 Months Ago
Transform plane directly to local instead of using inverse matrix
3 Months Ago
Tiled Frustums Start moving tiled_light_culling to use frusta Iterate frustum tiled culling Near/far tiled frustum planes Very simple ConeIntersect and AABBIntersect Cubemap frustum cullinng Show cubemap complexity on tiled debug vis as well https://files.facepunch.com/sampavlovic/1b2911b1/HM0UBknyYv.png Set up things to use worldSpaceNear to fix orthographic rendering with tiled rendering, use depth min/max for building tiled frustums https://imgur.com/a/tybd5Dv Fix ortho projection for CalculateScreenTiles [pick] Fix Depth::GetLinear and add Depth::Linearize fix DepthMinMax on ortho projections, fixes tiled lights on ortho projections https://files.facepunch.com/sampavlovic/1b3011b1/ZiyxdtwHc1.png Delete tiled_frustums_cs, main shader does everything, we recalculate it every frame anyway since we also match the depth chain for the far plane, can store it later again from it if we need it for anything
3 Months Ago
Apply cubemap normalization properly on flat ambient light Apply subsurface scattering to IBL lighting, looks shit otherwise https://imgur.com/a/yipFu52
3 Months Ago
Iterate GTAO Iterate GTAO
3 Months Ago
Fog Fix, allows you to change light settings for volumetric fog specifically and does a massive cleanup, last try of this had some perf issues but should be sorted Squashed commit of the following: commit 4c0d34857bb545c62a83b6b09ef65261dca3ddd8 Author: Sam Pavlovic <sam@sampavlovic.com> Date: Thu Oct 3 18:41:48 2024 +0100 We dont use CLightBinnerStandard::InitForView twice in same view, rename GetLightbinnerStandard from scenesystem to not conflict with views getlightbinnerstandard which has different behavior commit 8f3d1244f38a74525bcba28dc520ae5bf1dd1099 Author: Sam Pavlovic <sam@sampavlovic.com> Date: Wed Oct 2 14:06:40 2024 +0100 Make fog lights buffer persistent with the volumetric fog's lifetime commit 0d5bee31cad9b54fc75e2dbff85accfd03d7b3e1 Author: Sam Pavlovic <sam@sampavlovic.com> Date: Wed Oct 2 13:52:39 2024 +0100 Make sure this is properly inlined to never trash cache commit 5709fcf4b113088c684c095fc08d05fe176f940c Author: Sam Pavlovic <sam@sampavlovic.com> Date: Wed Oct 2 11:46:35 2024 +0100 LightBinner::InitFromParent and disable fog shadows commit 93fa098f5c55bddfa4b3d3261b26b7c9edfc8dd8 Author: Sam Pavlovic <sam@sampavlovic.com> Date: Tue Oct 1 18:01:49 2024 +0100 Some lightbinner cleanup, allow it to be used directly without the complex system that scenesystem wants, remove bRenderFogClipmaps for commit 6f0125fd6ad1bf5512346ffe3c727532a6687cf4 Author: Sam Pavlovic <sam@sampavlovic.com> Date: Fri Sep 6 13:23:03 2024 -0300 Put fog mode in it's own category and add nice icons to them https://files.facepunch.com/sam/1b0611b1/zwd8qAJFu7.png commit 0ff3702c73cf54edddc5dd82b8c54598904fae10 Author: Sam Pavlovic <sam@sampavlovic.com> Date: Fri Sep 6 13:14:08 2024 -0300 Share dynamic shadow atlas if we have more than one lightbinner per view ( for example, fog ), fix light fog strength commit 50170c166dd1cc37d863046aa632a30fb6629860 Author: Sam Pavlovic <sam@sampavlovic.com> Date: Fri Sep 6 12:47:35 2024 -0300 VolumetricFogRenderer has it's own lightbinner outside of lightbinner pool, does lightbinning to fetch fog lights for the fog context only, fixes fog light settings not doing anything, deprecate LAYERFLAGS_NEEDS_FOG_CONTRIBUTING_LIGHTS since we don't need special code for that anymore Don't update shadows on fog pass, some lights are set to be updated always but should all be fetched from cache
3 Months Ago
We dont use CLightBinnerStandard::InitForView twice in same view, rename GetLightbinnerStandard from scenesystem to not conflict with views getlightbinnerstandard which has different behavior
3 Months Ago
VolumetricFogRenderer has it's own lightbinner outside of lightbinner pool, does lightbinning to fetch fog lights for the fog context only, fixes fog light settings not doing anything, deprecate LAYERFLAGS_NEEDS_FOG_CONTRIBUTING_LIGHTS since we don't need special code for that anymore Share dynamic shadow atlas if we have more than one lightbinner per view ( for example, fog ), fix light fog strength Put fog mode in it's own category and add nice icons to them https://files.facepunch.com/sam/1b0611b1/zwd8qAJFu7.png Some lightbinner cleanup, allow it to be used directly without the complex system that scenesystem wants, remove bRenderFogClipmaps for LightBinner::InitFromParent and disable fog shadows Make sure this is properly inlined to never trash cache Make fog lights buffer persistent with the volumetric fog's lifetime
3 Months Ago
LightBinner::InitFromParent and disable fog shadows
3 Months Ago
VolumetricFogRenderer has it's own lightbinner outside of lightbinner pool, does lightbinning to fetch fog lights for the fog context only, fixes fog light settings not doing anything, deprecate LAYERFLAGS_NEEDS_FOG_CONTRIBUTING_LIGHTS since we don't need special code for that anymore Share dynamic shadow atlas if we have more than one lightbinner per view ( for example, fog ), fix light fog strength Put fog mode in it's own category and add nice icons to them https://files.facepunch.com/sam/1b0611b1/zwd8qAJFu7.png Some lightbinner cleanup, allow it to be used directly without the complex system that scenesystem wants, remove bRenderFogClipmaps for
3 Months Ago
If Graphics.RenderTarget is not overriden, let it return the actual output rendertarget so you can fetch MSAA textures without copy ( you're going to shoot your own balls using this if you dont know what you're doing ) Fix Depth::GetLinear and add Depth::Linearize
3 Months Ago
[pick] Fix Depth::GetLinear and add Depth::Linearize fix DepthMinMax on ortho projections, fixes tiled lights on ortho projections https://files.facepunch.com/sampavlovic/1b3011b1/ZiyxdtwHc1.png
3 Months Ago
Fix ortho projection for CalculateScreenTiles
3 Months Ago
Ortho test scene
3 Months Ago
Set up things to use worldSpaceNear to fix orthographic rendering with tiled rendering, use depth min/max for building tiled frustums https://imgur.com/a/tybd5Dv
3 Months Ago
Show cubemap complexity on tiled debug vis as well https://files.facepunch.com/sampavlovic/1b2911b1/HM0UBknyYv.png
3 Months Ago
Cubemap frustum cullinng
3 Months Ago
If Graphics.RenderTarget is not overriden, let it return the actual output rendertarget so you can fetch MSAA textures without copy ( you're going to shoot your own balls using this if you dont know what you're doing ) Tiled Frustums Start moving tiled_light_culling to use frusta Iterate frustum tiled culling Near/far tiled frustum planes Very simple ConeIntersect and AABBIntersect
3 Months Ago
Just get rid of F_DISABLE_Z_PREPASS entirely, it's not applicable for users to set it, static overlay uses BoolAttribute( NoZPrepass, true ); directly
3 Months Ago
use default depth_only combo for skin Remove F_DISABLE_Z_PREPASS from shaders except if you want it explicit, remove it from eyeao until we recompile shaders
3 Months Ago
Remove aoproxies ambient occlusion, it never looked too right and it's stupid to have artists authoring them manually, almost no one did I still think SDF AO works better than SSAO in most cases, but they should live as a renderhook and artists don't need to touch anything, the way it is now is very hard to maintain, it could be 10x simpler VrMonitor goes long unused since we removed SceneMonitor & VR Multiview Replace AO on shader with a single, non-directional AO but that composites properly, older shaders wont have incompatibility problems, also makes Dynamic Reflection work without ao AO on lighting pass GTAO stub, remove sdf.hlsl (until we meet again 🫡 ) Iterate gtao
3 Months Ago
Fill up _renderTarget on Graphics Scope so that we can fetch the immediate color/depth textures also without a copy Fetch depth and color directly for DoF so that we can do pixel perfect fetches, start making near dof not shit
3 Months Ago
Fix Depth::GetLinear, be expressive about it for correctness before all, precompute these values later Start fixing up dof https://files.facepunch.com/sam/1b2211b1/ombChoX97P.png Iterate DoF Smooth fade DoF from composite shader Iterate dof, needs cleanup, almost perfect Wave intrinsics to do early out for far dof DoF2 Downsample with bias based on depth, cleanup https://files.facepunch.com/sam/1b0211b1/sbox-dev_rXaN2wxsmC.mp4 Front blur, tweaks Final tweaks, add depth gap for adding an area where u might want more focus https://files.facepunch.com/sam/1b0211b1/sbox-dev_VBIoPeaBWP.mp4 Depth Resolve writes to both channels correctly Final cleanups for dof2
3 Months Ago
Enable autoexposure for other tonemaps https://files.facepunch.com/sam/1b1311b1/sbox-dev_mAXJ3CQmYe.mp4