userSam Pavloviccancel
branchsbox/mastercancel

558 Commits over 1,247 Days - 0.02cph!

Yesterday
Fix typo, not meant to pass high precision offset to fog, just direct position https://i.imgur.com/EGNuSTA.png
Yesterday
Shadow Cache + Time Sliced Shadows (#1535)
Yesterday
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
5 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
12 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
12 Days Ago
GPU Shadow Culling (#1523) --------- Co-authored-by: Matt Stevens <matt@mattstevens.co.uk>
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
40 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)
41 Days Ago
Actually set D_MSAA combo on depth_downsample
41 Days Ago
Vulkan: Fix validation errors with MSAA disabled, this should fix a lot of crashing problems for people playing without MSAA
49 Days Ago
Remove last references to lightbinnervr Readd Dynamic/Baked light settings on hammer
52 Days Ago
Fix build
52 Days Ago
Move light culling renderer to scenesystem and remove GetPtrValue hacks from it, we'll call it from lightbinner to pass results from light culling, layers still exist on renderingpipeline for ordering
59 Days Ago
Revert "Move depth prepass to be the first pass of everything, we'll use it on lightbinner for light culling from now on" This reverts commit 65bc314734f0003a9d2dc5c10e5f7da3a11a8db0.
59 Days Ago
Move depth prepass to be the first pass of everything, we'll use it on lightbinner for light culling from now on
2 Months Ago
Hash view ID to FindOrCreateFrameBufferScratchTexture as well to solve collision when we have multiple views with same resolution, eg with splitscreen Fix dynamic reflections and AO in viewported views Add compiled shaders for viewport shading fixes Texture barriers for SSR in multiple viewports
3 Months Ago
Revert "Remove bloom effects layers ("QuarterResEffects"), nothing is really using it, can be better done outside managed if you really want it, was used for the cool HLA ghost effects, did a quarter res depth downsample that was never used" This reverts commit f2ff2e24581df8b38093cce5717420957680fecd.
3 Months Ago
Revert shadow submition refactor, I'll revisit this in a bit
3 Months Ago
Don't actually flag a decal as translucent, makes them render twice since we have a specialized decal layer, on top of that when rendering as translucent it wants a MSAA depth buffer that's missing, so we bind a non-msaa error texture that makes vulkan shit itself
3 Months Ago
Remove atlas resizing, feels overengineered, way we have adaptive shadow render size makes it feel pointless Let shadow frusta be calculated entirely on shadowcache, removes redundant calculations and makes the data flow saner, remove bullshit from LightEntry Add support for clearing rects from shadow atlases properly, queue them, fixes shadows on multicam views and childrens, note that shadow caching will still only happen on children views for now
3 Months Ago
Delete passthrough.vmat
3 Months Ago
Update all shaders for good measure
3 Months Ago
Default rendersystem to Vulkan ;) (#1429)
3 Months Ago
Read back the window size from the main window the OS created, Windows will clip the size to the desktop if it's too big and we will have unmatching resolution between what we specify in the swapchain and the actual hwnd
3 Months Ago
Fix m_bForceEnableDebugUtils running always even when we dont have renderdoc or validation layers enabled, triples your perfomance on vulkan
3 Months Ago
Assume test mode will want rendersystemempty Right now our tests machine doesn't have a GPU attached, for d3d11 it's fine since this runs over D3D11 Warp renderer, but not on Vulkan. Change this if we ever do graphics tests on CI. Running locally our tests pass fine without it
3 Months Ago
Fix Graphics.MipmapGen trying to generate one out of bounds mip
3 Months Ago
SubContext support on RenderContext (#1441) * Add IRenderContext::GetSubContext() to get or create a sub context for a new thread, use it in managedsceneobject Render contexts can never be passed between threads; they can only be used on the thread that created them. The thread index will be set in the constructor and can't change after that. This causes a problem in our current implementation of SceneCustomObject that reuses the threaded render context on the main thread and expects we can add things,modify and render it from there, for D3D11 it is not a problem since the implementation or driver seems to have a mutex for command lists, but on Vulkan that gives validation errors and causes crashes. This implements the concept of SubThreads to RenderContext, a very simple way to pass the render context around and consume it in a timely manner, it creates a new render context with the same characteristics as the parent one in a new thread and submits it when the parent context is released
3 Months Ago
Remove deferred rendering meshes from scenelight We no longer have a hardcoded path for rendering viewmodel shadows, that will be handled with a special component in managed Fix depth normalization on GetWorldPosition, since we are using 3D Skyboxes again we are splicing a bit of the depth range, fixes feathering on sprites again
3 Months Ago
Fix motion blur not working, simplify it, make it use the same reconstruction technique as in dynamic reflections, I still don't like it but this gives correctness to it https://i.imgur.com/YkSiZXY.png
3 Months Ago
gaussian_bloom_blur compiled material to fix bloom on dev builds
3 Months Ago
Write vertexobject on end of scope
3 Months Ago
Softer depth comparison for subsurface scattering Implement Depth::GetWorldPosition properly, document it nicely Recompile sprite with depth feathering
3 Months Ago
Make gizmos use DynamicSceneObject, add CMeshBuilder2::WithInstancedTransforms to flag mesh to use transform system without changing vertex layout, fix transforms on dynamicsceneobject in native
4 Months Ago
Remove Thread_DrawDrawList mutex, seems to cause some issues on testing, working on a proper solution for it anyway
4 Months Ago
Remove planar reflections from scenesystem, remove unused shared shader defs
4 Months Ago
Remove ScenePortal/CMonitorObjectDesc, render a camera to texture for same functionality
4 Months Ago
Compile water shader UI doesn't consume vertex clipping or even skinning
4 Months Ago
Only bitch that vkQueuePresentKHR failed when it's an actual fail condition, some conditions are still considered and enqueued Fix pObjectName in RenderDeviceVulkan::Construct, empty string check was inverted VK Validation: Fix texture transition in CSceneSystem::DownsampleTexture, this is not to use depth stencils but will always assume color Imply console apps want rendersystemempty, maybe revisit this in the future if we want them to do any kind of GPU compute VK: Remove deprecated debug marker in favour of debug utils, should be getting prettier output from GPU profiling tools too Remove a bunch of redundant vulkan render markers, makes gpu debugging finally show up properly nice looking https://i.imgur.com/7Mq0lhv.png Colors that don't melt my eyes Add a temp mutex to DrawDrawList to fix race condition when drawing from main thread Fix glow outline rendering https://i.imgur.com/cK9VbNB.png Renderdoc label colors for managed drawcalls were black Highlight.cs: should be SetCombo not Set Don't change fbstate with the viewport size, can cause it to be bigger than the fbstate size too, viewport offsetting is done just right below Make MultisampleScreen take the MSAA amount from the current context rather than from the main swapchain, fixes validation of effects using the wrong MSAA level as what the layer wants, fixes glow outlines in preview cameras Don't write glow to alpha, makes camera previews and screenshots not be translucent with them, compile shader Simplify water shader removing fog and other components, these would all be in it's own entity component now, much simpler, also the whole shader needs to be thrown away Never expose intermediary MSAA'd depth to the user, you're just opening a can of pain, use Depth::Get() method instead Shaders need removing old MSAA depth ("SceneDepth"/"DepthBuffer") Directional AO depth doesnt use MSAA Keep MSAA depth read for decals only Remove bloom effects layers ("QuarterResEffects"), nothing is really using it, can be better done outside managed if you really want it, was used for the cool HLA ghost effects, did a quarter res depth downsample that was never used Delete viewmodel AO ( Will come back as a reuseable generic component for camera ), ripplecompute ( unused, shit ), fix depth fetching on Glass to use Depth::Get Remove crumbs of viewmodel ao
4 Months Ago
Fix translucents rendering in opaque layer, corretly make shadows-only casting models use game excluded layer, make depth prepass exclude SCENEOBJECTFLAG_EXCLUDE_GAME_LAYER, fixes rendering of translucents being messed
4 Months Ago
Update shaders with SSS and baked lightcookie fixes
4 Months Ago
2D Skybox has inifnite bounds too
4 Months Ago
Meant to upload spritecard not skin
4 Months Ago
ToolsVisHandleTransmissiveLighting just takes two params now
4 Months Ago
Update citizen with per-vertex curvature and update materials to match new shader changes https://i.imgur.com/Dt9X3Vv.mp4