userSam Pavloviccancel
reposboxcancel

1,342 Commits over 1,247 Days - 0.04cph!

6 Hours 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
Today
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
Yesterday
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
Yesterday
Fix file move on vpc for shadowmap_texturebarrier_renderer.h
Yesterday
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
Yesterday
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
Yesterday
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
3 Days Ago
Time sliced shadows + shadow caching
6 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
7 Days Ago
Backport more shadowcache code from cs2, start adapting lightbinner for new layout
8 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
8 Days Ago
Remove all atlas downsampling bullshit, not even being used Backport shadowcache from CS2
8 Days Ago
GPU Shadow Culling (#1523) --------- Co-authored-by: Matt Stevens <matt@mattstevens.co.uk>
8 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
8 Days Ago
Fix debug views for dynamic lights, update comments
10 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
11 Days Ago
Cone intersection for tiled light culling Bloat cones a wee bit, still do sphere culling for point lights
12 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
15 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
15 Days Ago
Remove all atlas downsampling bullshit, not even being used Backport shadowcache from CS2
20 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
20 Days Ago
Temp hack fix device lost error in NativeRenderingWidget.cs
20 Days Ago
Check if main camera is null for EnvmapProbe dynamic renders
20 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
20 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
21 Days Ago
Update shaders
21 Days Ago
Fix missing textures when trying to query cubemaps from skybox, default value for EnvironmentMap should be thrown from lightbinner, not renderingpipeline
21 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
28 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
28 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)
29 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
29 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
30 Days Ago
Flag hammer maps to always render cubemaps dynamically & always render at least one frame regardless of distance update settings
30 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
34 Days Ago
Use high quality GGX filtering if baking cubemap as OnEnabled
34 Days Ago
Adjust things on fast envmap filtering, major cleanup, rename shader to envmap_filtering
34 Days Ago
Wip fast cubemap filtering ( 2.5ms > 0.09ms 😱 )
34 Days Ago
Compiled shaders with normalization brightness fixes for cubes without SH, reenable cube normalization
35 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
35 Days Ago
CI fails building shaders when machine is coming from a branch that was deleted, full checkout action should be enough for pulling?
35 Days Ago
Be able to disable cubemap normalization without S_TOOLS_VIS on shader
35 Days Ago
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)
36 Days Ago
Don't flag SceneObject and SceneModel as ESceneObjectFlags.IS_OPAQUE, the materials should dictate it, fixes translucent materials drawing in opaque passes (& drawing twice)
37 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
37 Days Ago
Actually set D_MSAA combo on depth_downsample
37 Days Ago
Vulkan: Fix validation errors with MSAA disabled, this should fix a lot of crashing problems for people playing without MSAA
39 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
42 Days Ago
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
42 Days Ago
GGX filtering
42 Days Ago
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