645 Commits over 1,461 Days - 0.02cph!
Recompile glass with support for world mapping
Remove msdfgen, been there forever and we never used it for anything, better to implement it in C# if we ever need it
Remove ExtraShaderDataFormat, just have everything uniform
Remove EXTRA_SHADERDATA_FORMAT from shaders too
Fix glass not compositing translucency properly, also fix area light problems with it
Fix vrad light bounces for blendable
Revert that change to readd structs and do the proper fix
Keep struct in cbuffer layouts for legacy layout
Avoid models rendering black when assigning blendable to them
Don't offset the pixel position by the parallax offset for shadowing on complex, causing problems in 90 degree angles
Fix area lights nuking lighting when very small
Dispose temp rts on end of scope rather than when we request another one, lets reuse them through the frame, fixes multiple blurs not showing up
Remove remaining breadcrumbs of fsr
Better directional ao curve, update crate01
Fix directional AO falloff looking very faint and let it take ambient light into account for calculating hardness
https://files.facepunch.com/sam/1b0911b1/gpBUzR76wN.jpg
Redo and recompile aoproxies of all citizen props
https://files.facepunch.com/sam/1b0911b1/v3nI9nRpR1.jpg
Shadingmodel Declutter (#1041)
* Start cleaning up material and shadingapi
* Allow using functions inside of HLSL structs
https://i.imgur.com/t1AwQzr.png
* Replace all GatherMaterial bullshit with Material::From()
* Remove Material parameter references to things that aren't implemented yet, put TransformNormal in normals file
* Cut everything from ShadingModel too and let's start from a static class
* Redo light api on shaders, start implementing new dynamic light under this structure, move raytracing shit to it's own folder, add sample shadingmodel
* Allow structs in structs ( HLSL 2021 and forwards )
* Most of static light with the new api
* Fix shadowing on indexed lights on new light api
* Move shadingmodel structures to shadingmodel.hlsl
* Fix light static assignment for lighting api, fix shadowing for them too
* Stub for EnvironmentMapLight
* Implement cubemap light
* ShadingModelValve
* light.envmap.hlsl becomes light.environment.hlsl for better readability, add debug views to material api, CUSTOM_MATERIAL_INPUTS preprocessor
* AmbientLight
* Sane implementation atmospherics and debug vis postprocessing for shadingmodel api
* Finish debug vis, rename ShadingModelValve to ShadingModelStandard
* Start rewriting blendable with new api, port glass to new api
* Rewritten blendable shader
* Refactor remaining shaders to new shadingmodel api, fix shadergraph not working, readd procedural.hlsl for shadergraph but fix typo on title
Allow area light size to be changed in runtime
Simplify cubemap priority calculation
Assume an UAV texture written to lightcookie atlas should always be updated as well
Let transmissive mask use tint color in complex shader
https://i.imgur.com/5lkQh7M.png
Allow scaling roughness on legacy shaders
Fix sequential fog transforms being fucked, fix fog contribution always being at minimum of 0.001, cleanup
Make volumetric fog perfomance much better with area lights
fix lighthelper treating unrelated entities as lights, fixes slowdown on compile
Use previous logic for the recording texture but keep the rect crop
Fix F6 recording when FB scratchtexture is bigger than the screen
Make sure area lights don't intersect with walls so we can sample CDFs properly, do bound calculation properly, speed up SIMD path
Area light controls for spotlightentity and update gizmos for the other ones, CylinderLightEntity.cs > AreaLightEntity.cs
Area Lights (#885)
Co-authored-by: bakscratch
Remove SetMinimumFrameBufferRenderTargetSize, only used on SFM and it fucks scratch FBs, don't let SetMainSwapChain override behaviour of swapchain size listener on tools, remove hacks that we were using for setting scratch fbs
Fix fog drifting when your view is still by clamping max TAA value
Fix cubemap feathering on combined light probes
Fix eye shader disabling depth prepass for the entire sceneobject
Put ToMaterial only if we use material inputs, use custom ToMaterial for Blendable since we use different inputs, fixes tinting on multiblend, we're gonna rethink this soon
Readd break statement to material remap array after we find a match, use safer comparison
Add light scale for direct light calculation, make it be affected by FogContributionStength
Always render shadows if sky is visible on stationary direct lights
Readd FlushScratchRenderTargets, that's resized to the monitor screen anyway when you open a tool if you need an expanded viewport
Pass to shader pipeline if we're rendering on skybox, fix glass reprojection being fucked up on skybox
Fix glass not showing properly on tools view
Just set the max swapchain dimension to be the largest monitor dimension again, causes less problems while in tools mode, guarantees we won't have edge problems
Fix glass depth being fetched incorrectly in MSAA levels
Get the dimension of the biggest used axis for calculating swapchain dimensions, fixes FB copies having wrong dimensions on tools, allow texture downsamples to only downsample a region
Let decals do software-based culling, avoids slow copy of the depth buffer just to do redundant culling, that was also causing problems
Fix framebuffer copies taking wrong dimensions
Revert "Don't dispose of temp rendertarget when trying to resolve it again", This needs more thought and was causing problems
This reverts commit 6ee43b38e629221c8b8faa2c43d6eb3fa81f6afb.
Remap parameters from deprecated shaders still referenced in cloud materials
Glass2 (#936)
* Start recoding the glass shader from scratch
* Apply FrameBufferCopyTexture to entire layer rather than batch, fixes some batches returning a null texture
* Let Material API handle translucency opacity properly and accounting for specular, still need to account for tint opacity
* Iterate on new glass
* Randomize shatterglass normals
https://i.imgur.com/8EKzZZ8.mp4
* Add overlay layer and cheap rough refraction
* Downsample framebuffercopytexture to be used when needed
* Translucent shadows for glass
https://i.imgur.com/6KYigbg.png
* Redo downsample shader to work properly without flickering, right now with just gaussian since we don't use any others right now
* Pass downsample method before ComputeRenderablePassesForContext
* Cleanup glass shader, fix VR and Tools preview
* glass.shader_c
* Update glass materials and glass blur range
* Don't dispose of temp rendertarget when trying to resolve it again, GetTemporary gets from dict, fixes multiple ui blur fetches, this solution was causing issues before but seems fine now we're hashing every parameter
* Do 1px feathering on CopyFrameBufferCached to avoid sampling without real intersection
* Remove hacks from GenerateMips, rewrite downsample_cs to support other mip generation methods
* Fix FBCopies showing incorrectly on tools
https://i.imgur.com/1MnEiWe.png
* Fix comment that slipped through experimentation, add more explaination to Cheap Glass and Overlay Layer
Redo downsample shader to work properly without flickering, right now with just gaussian since we don't use any others right now
Don't dispose of temp rendertarget when trying to resolve it again, GetTemporary gets from dict, fixes multiple ui blur fetches, this solution was causing issues before but seems fine now we're hashing every parameter
Do 1px feathering on CopyFrameBufferCached to avoid sampling without real intersection
Remove hacks from GenerateMips, rewrite downsample_cs to support other mip generation methods
Update compiled skin shader with glow-in-dark fixes
Fix specifc shaders github action job referencing from the shader yml
Fix two lobe speculars not normalizing it's brightness (Skin glowing on dark)
https://i.imgur.com/pua5PV8.png
Remove SFM/Dota/Etc stuff from rendering pipeline (#904)
* Initialize lightShades so we don't get undefined behaviour when summing them, should still be mostly stubbed out by the compiler anyway if shadingmodel doesn't use it
* Delete all code, shaders and dependencies from other rendering pipelines
* Rewrite visualize_physics without deferred and deprecated stuff, also fix a bug with depth sorting
* Fix references to old pipelines on remainder of shaders
* Fix debug_sunshadow, update all_shaders list and delete compiled shaders for stuff we don't use anymore
* Remove HSL Grain and old Volumetrics from SFM, note that SFM lights already cast volumetrics in our pipeline without that
* Fix crash on moviedoc on maps with volumetrics
* Revert deletion of debug_sunshadow_vis.vmat
* Put RecoverWorldPosFromProjectedDepthAndRay on shared code
Fix typo VFX_REGISTER_INPUT_TEXTURE > VFX_REGISTER_TEXTURE