userSam Pavloviccancel

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

8 Months Ago
Disable frustum shadow map culling using volume cullers, the view we render for the shadow is already doing frustum culling so I'm not fully sure if this is doing anything, on CS2 it seems to only be used for barn light shadows anyway ( And with an explicit illumination bounds OOB )? Fixes shadow flickering on props
8 Months Ago
Fix typo, not meant to pass high precision offset to fog, just direct position https://i.imgur.com/EGNuSTA.png
8 Months Ago
Remove references to texture cube arrays Remove all CPU path for envmaps, bindings, fingerprinting, etc, should've removed 3 years ago but now we're ready for it
8 Months Ago
Bindless cubemaps!
8 Months Ago
Shadow Cache + Time Sliced Shadows (#1535)
8 Months Ago
Print actual lightdesc for shadow map on debug markers, cleanup
8 Months Ago
Readd shadow volume culling, CDrawShadowMapsForLightParams has all frusta inside itself, no need for multiple
8 Months Ago
Readd shadow volume culling, CDrawShadowMapsForLightParams has all frusta inside itself, no need for multiple
8 Months Ago
Remove all atlas downsampling bullshit, not even being used Backport shadowcache from CS2 Backport more shadowcache code from cs2, start adapting lightbinner for new layout Remove ConsiderLight and LightEntry, they're bullshit now and overcomplicated, used to figure out which lights had priority but not needed anymore, data flow is leaner now Time sliced shadows + shadow caching Remove shadow template views, doesn't make sense to have this code duplicated and makes it harder to work with it, I don't think we use those HLVR constants the code mentions, and if we do it should just be on the standard pipeline Vulkan: Fix ClearImpl not respecting layer viewports smaller than the screen, and instead just clearing everything with a fast renderpass, this caused issues when we want to just clear a small rect lb_time_sliced_shadows, fix directional lights not showing up, clear each rect when wanting to draw rather than having a complicated shadow atlas clear system Make CSM to be re-rendered for each view since they are view-dependent, but we can keep the same tiles we reserved Static vs. Dynamic object rendering for FindOrCreateShadowMapsForLight Fuck off with subrect clearing on shadowcache, we do it much simpler on draw now which is guaranteed to be clean, our goal is to go bindless too so it doesnt even apply Pass per view lighting constants to shadow, transition barriers to fog Fix file move on vpc for shadowmap_texturebarrier_renderer.h
8 Months Ago
Make atmospherics on shadingmodel take position with offset directly, recompile terrain with it, fixes volumetric fog on terrain
8 Months Ago
Add mutex on read/writing m_CulledLights, guarantees it won't be overwritten twice while doing a callback before finishing rendering next frame or would write while allocating lights
8 Months Ago
Fix baked fog on scenes, only enable volumetric fog if there are any fog volumes in scene https://files.facepunch.com/sampavlovic/1b2511b1/image%20%289%29.png
8 Months Ago
lb_indexed_pointlight_shadows. By default for now, don't cast shadows to indexed point lights if the cvar is set, rarely worth anything useful
8 Months Ago
Fix file move on vpc for shadowmap_texturebarrier_renderer.h
8 Months Ago
Fuck off with subrect clearing on shadowcache, we do it much simpler on draw now which is guaranteed to be clean, our goal is to go bindless too so it doesnt even apply Pass per view lighting constants to shadow, transition barriers to fog
8 Months Ago
Make CSM to be re-rendered for each view since they are view-dependent, but we can keep the same tiles we reserved Static vs. Dynamic object rendering for FindOrCreateShadowMapsForLight
8 Months Ago
Remove shadow template views, doesn't make sense to have this code duplicated and makes it harder to work with it, I don't think we use those HLVR constants the code mentions, and if we do it should just be on the standard pipeline Vulkan: Fix ClearImpl not respecting layer viewports smaller than the screen, and instead just clearing everything with a fast renderpass, this caused issues when we want to just clear a small rect lb_time_sliced_shadows, fix directional lights not showing up, clear each rect when wanting to draw rather than having a complicated shadow atlas clear system
8 Months Ago
Time sliced shadows + shadow caching
8 Months Ago
Remove ConsiderLight and LightEntry, they're bullshit now and overcomplicated, used to figure out which lights had priority but not needed anymore, data flow is leaner now
8 Months Ago
Backport more shadowcache code from cs2, start adapting lightbinner for new layout
8 Months Ago
Reduce parallel cubemap updates on load, we allocate a new lightbinner for each new parallel view and each of them allocates a lot of new GPU buffers when they should be shared, I'll revisit this after shadowcache
8 Months Ago
Remove all atlas downsampling bullshit, not even being used Backport shadowcache from CS2
8 Months Ago
GPU Shadow Culling (#1523) --------- Co-authored-by: Matt Stevens <matt@mattstevens.co.uk>
8 Months Ago
Remove all atlas downsampling bullshit, not even being used Was accidentally creating new lightbinner (without light info I needed too) every frame :S CSceneSystem::GetLightBinnerStandard() is "FindOrCreate" while from CSceneView actually gets the actual one GPU Shadow Culling POC: Don't render shadows that are not visible by GPU depth bounds sc_show_rejected_lights enum support for VFX HLSL We dropped DX11 support so we can support it without a worry microsoft/DirectXShaderCompiler/wiki/Language-Versions#hlsl-2017 r_gpu_shadow_culling cvar, parallelize static light visibility tests Cone intersection for tiled light culling Bloat cones a wee bit, still do sphere culling for point lights Move culled lights list for shadow culling to lightbinner rather than shadowcache, lightbinners are guaranteed to be per view (first order, first served though), this lets multiview work for culled lights https://i.imgur.com/JwxhgOJ.png Only show the considered lights in the debug view, we don't cull the unconsidered lights so it'd show them as unculled Cast shadows of non culled lights, not culled lights.. wtf? Only debug draw actual shadow casters, add spot light debug drawer Fix debug views for dynamic lights, update comments
8 Months Ago
Fix debug views for dynamic lights, update comments
8 Months Ago
Move culled lights list for shadow culling to lightbinner rather than shadowcache, lightbinners are guaranteed to be per view (first order, first served though), this lets multiview work for culled lights https://i.imgur.com/JwxhgOJ.png
8 Months Ago
Cone intersection for tiled light culling Bloat cones a wee bit, still do sphere culling for point lights
8 Months Ago
enum support for VFX HLSL We dropped DX11 support so we can support it without a worry microsoft/DirectXShaderCompiler/wiki/Language-Versions#hlsl-2017 r_gpu_shadow_culling cvar, parallelize static light visibility tests
9 Months Ago
Remove all atlas downsampling bullshit, not even being used Was accidentally creating new lightbinner (without light info I needed too) every frame :S CSceneSystem::GetLightBinnerStandard() is "FindOrCreate" while from CSceneView actually gets the actual one GPU Shadow Culling POC: Don't render shadows that are not visible by GPU depth bounds
9 Months Ago
Remove all atlas downsampling bullshit, not even being used Backport shadowcache from CS2
9 Months Ago
Fix tiled rendering on multiple viewports, was taking the main viewport from view rather than the actual viewport from layer :S https://i.imgur.com/PCXh3hJ.png
9 Months Ago
Temp hack fix device lost error in NativeRenderingWidget.cs
9 Months Ago
Check if main camera is null for EnvmapProbe dynamic renders
9 Months Ago
Cubemapper (#1504) * Cubemapper tests * Remove all ggx code for now & just copy directly to cubemap array * TextureCube with mipmaps and arrays and mipmaps * Move texture logic from cubemapper to c# * Stub for cubemapper_cs, will calculate both GGX and spherical harmonics all in GPU * Handle all array index stuff in cubemapper * Allow for single sliced cubemap array, needed to be able to render an independent texture in the renderer since it expects a TextureCubeArray, also allow TSPEC_CUBE_CAN_SAMPLE_AS_ARRAY if we want UAV Also fix a problem where CTextureManagerVulkan::GetImageView wouldn't work with a cubemap array as a rwtexture2darray in compute shaders * Fix cube orientation when copying, do texture per envmap probe instead of a singleton array, this will cause headaches with multiple envmaps intersecting but makes it much simpler * GGX filtering * Don't bother with writing cubemap normalization right now (in fact disable it for now!), reuse previous mip so that we have more quality with less samples * Assert isn't valid anymore in ComputeImageViews since we can pass a cube array * Do cubemapper processing of all faces at once without using intermediary copies, 4-8x speedup (~17ms > ~2.5ms), still needs to be faster https://i.imgur.com/b61mX1Y.png * Rendersystemvulkan: Alllow binding specific cubemap [ & arrays ] mips if UAV * Remove unsued, clean up * Dynamic cubemap component settings * Remove the old BuildCubeMaps * Add WidgetUtil.CreateSwapChain * NativeRenderingWidget renders in regular render path * Fix RenderDeviceInfo_t wrong size * Add HandlePendingSwapChainResize for explicitly handling swapchain resize events before doing any work, fixes NativeRenderingWidget.RenderScene rendering on a frame with different window size than the actual swapchain ( and then having invalid color/depth buffers) * CI fails building shaders when machine is coming from a branch that was deleted, full checkout action should be enough for pulling? * If cubemap has no normalization set, don't consider it for NormalizeCubeBrightness * Compiled shaders with normalization brightness fixes for cubes without SH, reenable cube normalization * Wip fast cubemap filtering ( 2.5ms > 0.09ms 😱 ) * Adjust things on fast envmap filtering, major cleanup, rename shader to envmap_filtering * Use high quality GGX filtering if baking cubemap as OnEnabled * Vulkan: Fix image transition layout when binding a mip of a cubemap that's sampleable as Texture2DArray * Don't fetch render attributes from context, that's composited over, fixes a crash * Assert when UAV Index is invalid * Flag hammer maps to always render cubemaps dynamically & always render at least one frame regardless of distance update settings * Ignore cubemap precomputed handshakes, we can add and remove cubemaps at will on scene, those do not have handshakes so the entire thing was already deprecated when we implemented maploader, this cache gets built by m_nCachedEnvMap at runtime This fixes scene cubemaps not showing on static map geometry * ANTLR: Support any dimension arrays * Use fast envmap filtering even for static ones, looks as good if not better than brute forcing if using a few more taps, delete reference_ibl_lighting.fxc (byebye) * Run filtering in two passes to eliminate any fireflies, realtime filtering looks as good as baked filtering now https://files.facepunch.com/sampavlovic/1b2911b1/465thMK9Yq.jpg * Limit number of simultanious cubemap updates on first load to not overflow transform count in large scenes * Remove S_SPECULAR_CUBE_MAP, stupid define, should just be S_SPECULAR * Extra checks on HandlePendingSwapChainResize, should fix device lost issues when trying to draw subsequently * Adjust number of threads on envmap filtering to avoid collision on accessing same source cubemap on per frame cubemap rendering, doesn't really slow this down * Fix missing textures when trying to query cubemaps from skybox, default value for EnvironmentMap should be thrown from lightbinner, not renderingpipeline * Update shaders --------- Co-authored-by: Garry Newman
9 Months Ago
Update cubemap.dynamic.scene with actual dynamic cubemaps
9 Months Ago
Cubemapper tests Remove all ggx code for now & just copy directly to cubemap array TextureCube with mipmaps and arrays and mipmaps Move texture logic from cubemapper to c# Stub for cubemapper_cs, will calculate both GGX and spherical harmonics all in GPU Handle all array index stuff in cubemapper Allow for single sliced cubemap array, needed to be able to render an independent texture in the renderer since it expects a TextureCubeArray, also allow TSPEC_CUBE_CAN_SAMPLE_AS_ARRAY if we want UAV Also fix a problem where CTextureManagerVulkan::GetImageView wouldn't work with a cubemap array as a rwtexture2darray in compute shaders Fix cube orientation when copying, do texture per envmap probe instead of a singleton array, this will cause headaches with multiple envmaps intersecting but makes it much simpler GGX filtering Don't bother with writing cubemap normalization right now (in fact disable it for now!), reuse previous mip so that we have more quality with less samples Assert isn't valid anymore in ComputeImageViews since we can pass a cube array Do cubemapper processing of all faces at once without using intermediary copies, 4-8x speedup (~17ms > ~2.5ms), still needs to be faster https://i.imgur.com/b61mX1Y.png Rendersystemvulkan: Alllow binding specific cubemap [ & arrays ] mips if UAV Remove unsued, clean up Dynamic cubemap component settings Remove the old BuildCubeMaps Add WidgetUtil.CreateSwapChain NativeRenderingWidget renders in regular render path Fix RenderDeviceInfo_t wrong size Add HandlePendingSwapChainResize for explicitly handling swapchain resize events before doing any work, fixes NativeRenderingWidget.RenderScene rendering on a frame with different window size than the actual swapchain ( and then having invalid color/depth buffers) CI fails building shaders when machine is coming from a branch that was deleted, full checkout action should be enough for pulling? If cubemap has no normalization set, don't consider it for NormalizeCubeBrightness Compiled shaders with normalization brightness fixes for cubes without SH, reenable cube normalization Wip fast cubemap filtering ( 2.5ms > 0.09ms 😱 ) Adjust things on fast envmap filtering, major cleanup, rename shader to envmap_filtering Use high quality GGX filtering if baking cubemap as OnEnabled Vulkan: Fix image transition layout when binding a mip of a cubemap that's sampleable as Texture2DArray Don't fetch render attributes from context, that's composited over, fixes a crash Assert when UAV Index is invalid Flag hammer maps to always render cubemaps dynamically & always render at least one frame regardless of distance update settings Ignore cubemap precomputed handshakes, we can add and remove cubemaps at will on scene, those do not have handshakes so the entire thing was already deprecated when we implemented maploader, this cache gets built by m_nCachedEnvMap at runtime This fixes scene cubemaps not showing on static map geometry ANTLR: Support any dimension arrays Use fast envmap filtering even for static ones, looks as good if not better than brute forcing if using a few more taps, delete reference_ibl_lighting.fxc (byebye) Run filtering in two passes to eliminate any fireflies, realtime filtering looks as good as baked filtering now https://files.facepunch.com/sampavlovic/1b2911b1/465thMK9Yq.jpg Limit number of simultanious cubemap updates on first load to not overflow transform count in large scenes Remove S_SPECULAR_CUBE_MAP, stupid define, should just be S_SPECULAR Extra checks on HandlePendingSwapChainResize, should fix device lost issues when trying to draw subsequently Adjust number of threads on envmap filtering to avoid collision on accessing same source cubemap on per frame cubemap rendering, doesn't really slow this down Fix missing textures when trying to query cubemaps from skybox, default value for EnvironmentMap should be thrown from lightbinner, not renderingpipeline Update shaders
9 Months Ago
Update shaders
9 Months Ago
Fix missing textures when trying to query cubemaps from skybox, default value for EnvironmentMap should be thrown from lightbinner, not renderingpipeline
9 Months Ago
Limit number of simultanious cubemap updates on first load to not overflow transform count in large scenes Remove S_SPECULAR_CUBE_MAP, stupid define, should just be S_SPECULAR Extra checks on HandlePendingSwapChainResize, should fix device lost issues when trying to draw subsequently Adjust number of threads on envmap filtering to avoid collision on accessing same source cubemap on per frame cubemap rendering, doesn't really slow this down
9 Months Ago
Run filtering in two passes to eliminate any fireflies, realtime filtering looks as good as baked filtering now https://files.facepunch.com/sampavlovic/1b2911b1/465thMK9Yq.jpg
9 Months Ago
ANTLR: Support any dimension arrays Use fast envmap filtering even for static ones, looks as good if not better than brute forcing if using a few more taps, delete reference_ibl_lighting.fxc (byebye)
9 Months Ago
Ignore cubemap precomputed handshakes, we can add and remove cubemaps at will on scene, those do not have handshakes so the entire thing was already deprecated when we implemented maploader, this cache gets built by m_nCachedEnvMap at runtime This fixes scene cubemaps not showing on static map geometry
9 Months Ago
Cubemapper tests Remove all ggx code for now & just copy directly to cubemap array TextureCube with mipmaps and arrays and mipmaps Move texture logic from cubemapper to c# Stub for cubemapper_cs, will calculate both GGX and spherical harmonics all in GPU Handle all array index stuff in cubemapper Allow for single sliced cubemap array, needed to be able to render an independent texture in the renderer since it expects a TextureCubeArray, also allow TSPEC_CUBE_CAN_SAMPLE_AS_ARRAY if we want UAV Also fix a problem where CTextureManagerVulkan::GetImageView wouldn't work with a cubemap array as a rwtexture2darray in compute shaders Fix cube orientation when copying, do texture per envmap probe instead of a singleton array, this will cause headaches with multiple envmaps intersecting but makes it much simpler GGX filtering Don't bother with writing cubemap normalization right now (in fact disable it for now!), reuse previous mip so that we have more quality with less samples Assert isn't valid anymore in ComputeImageViews since we can pass a cube array Do cubemapper processing of all faces at once without using intermediary copies, 4-8x speedup (~17ms > ~2.5ms), still needs to be faster https://i.imgur.com/b61mX1Y.png Rendersystemvulkan: Alllow binding specific cubemap [ & arrays ] mips if UAV Remove unsued, clean up Dynamic cubemap component settings Remove the old BuildCubeMaps Add WidgetUtil.CreateSwapChain NativeRenderingWidget renders in regular render path Fix RenderDeviceInfo_t wrong size Add HandlePendingSwapChainResize for explicitly handling swapchain resize events before doing any work, fixes NativeRenderingWidget.RenderScene rendering on a frame with different window size than the actual swapchain ( and then having invalid color/depth buffers) CI fails building shaders when machine is coming from a branch that was deleted, full checkout action should be enough for pulling? If cubemap has no normalization set, don't consider it for NormalizeCubeBrightness Compiled shaders with normalization brightness fixes for cubes without SH, reenable cube normalization Wip fast cubemap filtering ( 2.5ms > 0.09ms 😱 ) Adjust things on fast envmap filtering, major cleanup, rename shader to envmap_filtering Use high quality GGX filtering if baking cubemap as OnEnabled Vulkan: Fix image transition layout when binding a mip of a cubemap that's sampleable as Texture2DArray Don't fetch render attributes from context, that's composited over, fixes a crash Assert when UAV Index is invalid Flag hammer maps to always render cubemaps dynamically & always render at least one frame regardless of distance update settings
9 Months Ago
Flag hammer maps to always render cubemaps dynamically & always render at least one frame regardless of distance update settings
9 Months Ago
Cubemapper tests Remove all ggx code for now & just copy directly to cubemap array TextureCube with mipmaps and arrays and mipmaps Move texture logic from cubemapper to c# Stub for cubemapper_cs, will calculate both GGX and spherical harmonics all in GPU Handle all array index stuff in cubemapper Allow for single sliced cubemap array, needed to be able to render an independent texture in the renderer since it expects a TextureCubeArray, also allow TSPEC_CUBE_CAN_SAMPLE_AS_ARRAY if we want UAV Also fix a problem where CTextureManagerVulkan::GetImageView wouldn't work with a cubemap array as a rwtexture2darray in compute shaders Fix cube orientation when copying, do texture per envmap probe instead of a singleton array, this will cause headaches with multiple envmaps intersecting but makes it much simpler GGX filtering Don't bother with writing cubemap normalization right now (in fact disable it for now!), reuse previous mip so that we have more quality with less samples Assert isn't valid anymore in ComputeImageViews since we can pass a cube array Do cubemapper processing of all faces at once without using intermediary copies, 4-8x speedup (~17ms > ~2.5ms), still needs to be faster https://i.imgur.com/b61mX1Y.png Rendersystemvulkan: Alllow binding specific cubemap [ & arrays ] mips if UAV Remove unsued, clean up Dynamic cubemap component settings Remove the old BuildCubeMaps Add WidgetUtil.CreateSwapChain NativeRenderingWidget renders in regular render path Fix RenderDeviceInfo_t wrong size Add HandlePendingSwapChainResize for explicitly handling swapchain resize events before doing any work, fixes NativeRenderingWidget.RenderScene rendering on a frame with different window size than the actual swapchain ( and then having invalid color/depth buffers) CI fails building shaders when machine is coming from a branch that was deleted, full checkout action should be enough for pulling? If cubemap has no normalization set, don't consider it for NormalizeCubeBrightness Compiled shaders with normalization brightness fixes for cubes without SH, reenable cube normalization Wip fast cubemap filtering ( 2.5ms > 0.09ms 😱 ) Adjust things on fast envmap filtering, major cleanup, rename shader to envmap_filtering Use high quality GGX filtering if baking cubemap as OnEnabled Vulkan: Fix image transition layout when binding a mip of a cubemap that's sampleable as Texture2DArray Don't fetch render attributes from context, that's composited over, fixes a crash Assert when UAV Index is invalid
9 Months Ago
Use high quality GGX filtering if baking cubemap as OnEnabled
9 Months Ago
Adjust things on fast envmap filtering, major cleanup, rename shader to envmap_filtering
9 Months Ago
Wip fast cubemap filtering ( 2.5ms > 0.09ms 😱 )
9 Months Ago
Compiled shaders with normalization brightness fixes for cubes without SH, reenable cube normalization
9 Months Ago
CI fails building shaders when machine is coming from a branch that was deleted, full checkout action should be enough for pulling? If cubemap has no normalization set, don't consider it for NormalizeCubeBrightness