userSam Pavloviccancel

1,418 Commits over 1,247 Days - 0.05cph!

Today
Fix typo, not meant to pass high precision offset to fog, just direct position https://i.imgur.com/EGNuSTA.png
Today
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
Today
Bindless cubemaps!
Today
Shadow Cache + Time Sliced Shadows (#1535)
Today
Print actual lightdesc for shadow map on debug markers, cleanup
Today
Readd shadow volume culling, CDrawShadowMapsForLightParams has all frusta inside itself, no need for multiple
Today
Readd shadow volume culling, CDrawShadowMapsForLightParams has all frusta inside itself, no need for multiple
Today
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
Today
Make atmospherics on shadingmodel take position with offset directly, recompile terrain with it, fixes volumetric fog on terrain
4 Days 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
4 Days 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
4 Days 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
5 Days Ago
Fix file move on vpc for shadowmap_texturebarrier_renderer.h
5 Days 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
5 Days 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
5 Days 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
7 Days Ago
Time sliced shadows + shadow caching
10 Days 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
10 Days Ago
Backport more shadowcache code from cs2, start adapting lightbinner for new layout
11 Days 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
11 Days Ago
Remove all atlas downsampling bullshit, not even being used Backport shadowcache from CS2
11 Days Ago
GPU Shadow Culling (#1523) --------- Co-authored-by: Matt Stevens <matt@mattstevens.co.uk>
11 Days 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
11 Days Ago
Fix debug views for dynamic lights, update comments
14 Days 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
15 Days Ago
Cone intersection for tiled light culling Bloat cones a wee bit, still do sphere culling for point lights
15 Days 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
19 Days 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
19 Days Ago
Remove all atlas downsampling bullshit, not even being used Backport shadowcache from CS2
24 Days 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
24 Days Ago
Temp hack fix device lost error in NativeRenderingWidget.cs
24 Days Ago
Check if main camera is null for EnvmapProbe dynamic renders
24 Days 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
24 Days Ago
Update cubemap.dynamic.scene with actual dynamic cubemaps
24 Days 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
24 Days Ago
Update shaders
24 Days Ago
Fix missing textures when trying to query cubemaps from skybox, default value for EnvironmentMap should be thrown from lightbinner, not renderingpipeline
25 Days 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
31 Days 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
31 Days 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)
32 Days 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
33 Days 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
34 Days Ago
Flag hammer maps to always render cubemaps dynamically & always render at least one frame regardless of distance update settings
34 Days 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
38 Days Ago
Use high quality GGX filtering if baking cubemap as OnEnabled
38 Days Ago
Adjust things on fast envmap filtering, major cleanup, rename shader to envmap_filtering
38 Days Ago
Wip fast cubemap filtering ( 2.5ms > 0.09ms 😱 )
38 Days Ago
Compiled shaders with normalization brightness fixes for cubes without SH, reenable cube normalization
38 Days 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
38 Days Ago
CI fails building shaders when machine is coming from a branch that was deleted, full checkout action should be enough for pulling?