558 Commits over 1,247 Days - 0.02cph!
Mixed Shadows Rework (#710)
* Remove mixed shadow fading, it never worked properly, we can do it better, increase mixed light shadows limit to 4, remove light evaluation budget
* Support for point light evaluation, let sunlight always have highest evaluation score, debug cleanup
* Let directional AO have falloff that better approximates to inverse square law
* Use 8k shadow atlas by default so that we downsample less often, reenable not casting shadows on point lights, needs more thought
* Have adaptive resolution for mixed shadows
* Recode all mixed light selection heuristics 🍷
* Extract importance calculation to CalculateMixedLightImportance, finish it
* Cleanup, remove rest of old mixed shadows heuristics that is unused now
* Cleanup, do shadow computations every .1 seconds rather than evecry frame
* Do a few visibility tests to see if the light is visibile to an entity and not fully shadowed
* Don't care at all for lights behind us that are not overlapping the player
* Tweak visibility testing, let directional lights go into test rather than just checking if sky is visible
* More cleanup
* Ortho lights trace on backwards direction, do shadow queries from light's perspective
* Do backface culling on ortho lights too
* Last final weighting adjustments
Fix edge vignietting on single pass gaussian blur
Stencil highlights (#701)
* Initial work on stencil glows
* Unbind SetStencilMode, not really needed, add clear with stencil support instead
* Do custom blending to avoid overdraw and set render priority so outlines blend with eachother
* Update shader
* Bind pattern scroll scale to the shader and compile optimized shaer
* Delete older highlight postprocess shader, actually bind clear with stencil support
* Reduce number of iterations on thin lines
* Remove pattern from being assignable in code, let it be done in material instead,
* Use temporary depth-only rendertarget instead of clearing depth, there are effects that still depend on depth on screenspace postproecss stage, allow binding only depth
* Remove standard shading code from highlight shader, doesn't need it at all
* Put highlight shader on the same folder as highlightrenderer, put the old highlight shader on shaders folder so gamemodes that aren't updated don't break
Disable water reflections until Water rework, it's look slowly degraded over time to a point where it's looking worse than if on and taking too much frametime. We'll do it better.
UI Blur with mip chain
Blur the actual mip chain, same number of fetches as doing custom bicubic fetch with mips
Glass refraction texture is already MSAA resolved, we're sampling a non MSAA image :S
Generate mips after resolving framebuffer
Add blurred downsample shader
Remove ui_blur shader, do blur on the single cheap drawcall of the backdrop filter shader 🍷🗿
Single pass downsample
Iterate on single pass blur, use DX11 mipmapper to solve race condition between mip levels
Solve race condition on shader, do both axis sequentially
Deprecate GenerateMipMaps
Move mips generation stuff to Texture.Utils
Cleanup
Let's not break the API, don't use UAV if we don't expect to use Mips
Move GenerateMips back to Graphics since we're in a render block
Move MSAA methods to use MultisampleAmount enum reducing clutter, add summary of DownsampleMethods
Merge pull request #699 from Facepunch/fast-blurs-2
Fast Blurs
Simulate clothes on tick by default
https://i.imgur.com/AHZml3P.mp4
Make custom shaders shared VS code not add bullshit that just goes unused
Implement initial cubemap priority sorting in our cubemap system
Fix tiled light builder adding one garbage envmap to the list
Fix crash due to trying to access invalid prepass layer
Take biggest radius component when passing shape proxies to gpu
Unify alphatested depth prepass stuff to r_depth_prepass, force it to have conservative culling, fixes aliasing on alphatested materials
Fix fallback shaders pointing to their deprecated counterparts, fixes ToolsShadingComplexity for the upcoming debug views refactor
Much better directional ao falloff curve
Use same AO directionality filter path on lightmapped materials to fix backface bleed
Fix remaining .vfx references in code
Fix monitor rendering in vr
https://i.imgur.com/RxCVQ2h.png
Remove subview stuff from vr.cpp, not neded in our case
Remove FSR, wasn't doing much and was causing issues with VR stencil, fix vr stencil debug
Granular foveated rendering, still needs cleanup
Remove old deprecated depth of field, cleanup checkerboard reconstruction
Add convars for vr_foveated_rendering
Get center lens position from HMD, pass foveation parameters to GPU
Cleanup and update shader files
Readd FSR for now, wouldn't be able to properly remove it until we have a good replacement, but don't bother with it if we're in VR
Remove unused convars
Tweak autofidelity, remove autofidelity for multigpu, add autofidelity for mobile while at it, fix typo
Tie vr_foveated_rendering to autofidelity, optimize shaders a bit
Fix rebase changes for shader assets
Merge pull request #652 from Facepunch/vr-foveated-rendering
VR Foveated Rendering
We aren't actually encoding normals on standard shader, so let's fix that, also let's have it DXT5 instead of BC7
Revert "Unify alphatested depth prepass stuff to r_depth_prepass, force it to have conservative culling, fixes aliasing on what's otherwise a fine painting to be put in a museum"
This reverts commit aef55245f9cb3c500db9e32259cbde7f4b9f616d.
We do want to depth prepass in monitor views, it's much faster
Unify alphatested depth prepass stuff to r_depth_prepass, force it to have conservative culling, fixes aliasing on what's otherwise a fine painting to be put in a museum
https://i.imgur.com/l5kIX0T.png
Fix directional lightmaps and tangents on shadingmodel (including blendable), cleanup blendable, make directional lightmap settings not user editable since they're bullshit for artists
We always want fast compile on iterations
Recompile blendable
Remove vr_ prefix from things that aren't actually dependent on VR
Eyes have roughness mask too
https://i.imgur.com/tSxAguq.png
Don't cutoff rough high quality reflections, we already have optimizations to deal with that, fix directionality of directional AO when there's no lightmaps
https://i.imgur.com/eA8f4pJ.png
Rust player has the same eyes
Eye shader now adapts the iris to the luminosity of the env 👀
https://i.imgur.com/lLUm03S.png
Add parallax to citizen's eyes
https://i.imgur.com/ItsxkjG.png
Backport UI fixes that were on resource-refactor branch, makes it stop asserting like crazy on debug
Don't do tiled rendering on skybox, unlikely to yield any gains, fixes all the remaining problems on tiled rendering due to ordering
Revert "Allow for point light mixed light shadows"
This reverts commit 46e7af989de7c83b3c8b8898978b88da7145c4e6.
Completely eliminate flicker on far fog clipmaps while reducing ghosting
Make voxel resolution from env_volumetric_fog_controller be less confusing and match the description of combined lights, default indirect lighting to 1, increase draw distance
Allow for point light mixed light shadows
Remove old lightbinner that isn't used
Remove FOG_LIGHTING_MODE_BAKED_NOSHADOWS, it's only used for hammer preview and just confuses people, default lights to affect fog
Make Henyey-Greenstein curve from dynamic fog match luminosity of baked fog, improve TAA on fog
https://imgur.com/a/h4G7Qr4
Fix baked fog
Fix high quality reflections showing checkerboards when it shouldnt
Fix directional AO shipping without actual directionality
Fix Shape Buffer not being generated and being cleared at wrong moment
Prototype directional AO, fix reflections not showing up on shaders
Send proxy mesh info as proper capsules rather than ellipsoids (which has always been silly), unify debug overlay code for them
implement capsules in shader, encode directionality https://i.imgur.com/RMaTU6Q.png
Implement capsule shape on reflections too
https://i.imgur.com/ZEf0dxa.png
Unify all aoproxy code so it's not a mess all around, makes it easier to add new shape types, add stubs for cylinder aoproxies
Cylinder aoproxy meshes https://i.imgur.com/T36lRDH.png
Dot product with geometric normals to avoid double occlusion on AO, fixes most artifacts
Remove edge artifacting with ambient shadows
https://i.imgur.com/GV8SXq3.png
Misc tweaks and fixes, set default AO distance to 40, better self occlusion filter
Move reflection compositing code to base code, add option to check if high quality reflctions are enabled to shader without a combo
Disable aoproxy caching on models with animgraphs
update shader objects
Cleanup, better do vignietting
Finish directional AO code before cleanup, use lightmap directionality if we are compositing to one
Fix aoproxy shapes of most standard props
Add support for high quality reflections in Complex shader
Add high quality reflection option to complex
Cleanup directional AO, have softer vigniette
Some more prop aoproxy adjustments
Fix flickering on directional AO probes
Readd AOProxy instancing, batch AOProxies by LPV
Increase precision of SDF tracing
Only try to sample from reflection buffer if we have reflections defined at all on the shader
Put ShapeManager on SceneWorld rather than in a singleton, fixes flickering with multiple panels
Revert some experiments that shouldn't be in this branch
Update shader files
Sample default direction if we don't have a lightprobe
Fix VR perspective on directional AO and reflections
Don't run with rendersystemdx11 at all for content building, merge results on finish rather than on batches, reduce number of processors for testing
CI worked perfectly with the previous thing, let's try without processor throttling
Add -skiprendersystem param instead of forcing to it, map resourcecompiler needs GPU
Merge pull request #614 from Facepunch/aoproxies-suck
AOProxies Rework
Revert "Sprite card compiled shader with fixes"
This reverts commit ed5cfdcc2bd94d525dc48e55373bad7f0889747f.
Fix typo on spritecard
Sprite card compiled shader with fixes
https://i.imgur.com/B1O3Eqc.png
Fix incorrect blending on spritecard, makes render scene test pass
Don't bother with multiview instancing unless we explicitely want it, previous behaviour was to always ignore it even when we wanted it, fixes decals and other stuff in VR
Update shaders with adjustments for tiled rendering
Greatly increase depth precision for world, fix decals in VR, don't do viewmodel offsetting at all on VR
Fix Undefined Behaviour In Tiled Rendering
Disable seamless fade for dof, better to keep the nice translucent sorting for now
Fix intersection on box on tiled light builder, don't bother trying to get intersection inside of box
Also reenable depth cull
Bloat bbox a bit to catch edges, send updated compiled shader
Add simple_liquid to replacement list too
start removing vr_warp, modern HMDs don't need it
cull most unused shaders, remove unused include files, rename shaders with sbox_ prefix to better names
Cleanup shaders, compile renamed shaders
Remove vr warp and most of subview rendering
More cleanup
Remove subview rendering, if we use foveated we'll roll our own solution
Remove more bullshit, start reimplementing a sane spectator view
Reimplement spectator view
Remove anything to do with aerial perspective, remove old glass shader
Remove wrinkle from complex, cleanup and cull some more shaders
remove complex and spritecard from build list, want to quickly test if everything is okay on CI
Update all_shaders.txt
move remaining materials that use blend.vfx to blendable, delete blend.vfx
Merge branch 'shader-cull' of sbox into shader-cull
remove compiled files of the shaders we removed
Update shaders with the cleaned up code
keep old glass shader while the new one isn't merged in
Remove deferred lights from code, only care for the lightbinner we use
remove old blur and old bloom
Remove grasstile materials
Remove auto fidelity visualizer, remove bilateral blur and liquid shader, remove remaints of old blur shader
Remaining missing materials and compiled shaders
Replace removed shaders that are still referenced in some assets with it's replacement shader
Update foliage and legacy glass with the correct depth shader
Add parallax occlusion to list of shader replacements
Remove postprocess_standard, readd floor_pebbles_a with correct shader
Update compiled addon shaders
Merge pull request #506 from Facepunch/shader-cull
Shader Cull Cleanup
Correct and simplify standard shading model envmaps and lights
Make LPV use another shading model