1,728 Commits over 1,491 Days - 0.05cph!
VRAD3 (& it's resourcecompiler) explicitly uses rendersystem, our tools can omit it but we need to read back textures from the GPU for map compilation
Launch ToolAppSystem pretending to be a dedicated server so it doesn't use rendersystem for CI, revert me soon
Reenable rendersystem for console apps for map compilation
Invert logic of bSupportsLightmapping, make explicit flag of "NoLightmapping", doesn't feel right to apply that flag in every shader when it all should just support it
Fix indirect IBL fog not working
https://files.facepunch.com/sampavlovic/1b1911b1/jVWTMafLaa.png
Do view vector TAA jitter for fog on native instead off shader, proper way to handle this specially on thin surfaces
https://files.facepunch.com/sampavlovic/1b1911b1/B2DSaqPTHe.jpg
Be able to fetch all light information with Light::Count() and Light::From(), while doing all optimization from tiled lighting etc
Move light.hlsl to common/classes/Light.hlsl, start unfucking it, make it have same structure as everything else
DynamicLight refactor
Refactor StaticLight class, can do Light::From() to get all lights (static/dynamic) at once
https://i.imgur.com/jqko5ON.mp4
Fuck of with light.environment, light.dynamic and light.static are just in Light.hlsl instead of own internal files
Move shadow functions to Shadow.hlsl, much like BRDF.hlsl, will make it easy for us to upgrade, move LightMap definitions to Light.hlsl
Vr_lighting never directly referenced from any of our hlsls now, tonemaps in lighting.fxc never used and even if used shouldn't be there
Untangle this stuff
Use ProbeLight::UsesProbes() and LightmappedLight::UsesLightmaps() to see if drawcall is using these instead of insane combo ifdefs directly, makes it easy to remove a combo too
Remove lightmapping combos from sbox_pixel (should fuck that file off entirely), move to shadingmodel.hlsl, keep D_BAKED_LIGHTING_FROM_LIGHTMAP for vertex.hlsl, SupportsLightmapping attribute seems unused
Revert "Lightmapping combos go on shadingmodel, Lightmapping definiton should be in shadingmodel.hlsl not Material.hlsl, material should be only a contract to shadingmodels"
Fucked, need to get rid of this stupid SupportsLightmapping attribute and just do it directly
Rewrite AmbientLight into a class, stub
Handle AmbientLightKind::LightMapProbeVolume and AmbientLightKind::EnvMap
Move BRDF stuff to BRDF.hlsl, organizes it and makes it easier to move to CS2's one with multiscatter
Adjustments for AmbientLight, disable subsurface scattering for this class for now
ToolsVis ambient occlusion doesn't take AmbientLight
Lightmapping combos go on shadingmodel, Lightmapping definiton should be in shadingmodel.hlsl not Material.hlsl, material should be only a contract to shadingmodels
Add namespace_name to antlr grammar so that we can do "type Class::Function()" definition instead of defining all in class itself, we should just let it accept any HLSL
Remove crumbs of ToolsShadingComplexity, we can replicate quad overdraw in almost every material without a special mode, shading complexity itself is on toolsvis now, toolsvis class
There's also a duplicate shading complexity shader
Lightmapping combos go on shadingmodel
Fix typos
Remove ToolsVis() and ToolsShadingComplexity() ( & ToolsWireframe ) mode from everything
EnvironmentMap::From to calculate all envmaps on a position
PerViewLightingConstantBuffer_t completely unused
environmentmapped bool is bullshit now that cubemaps are gpu driven, add stub EnvironmentMapping.hlsl
Detangle all of this, vr_lighting never directly referenced from any of our hlsls now
Fuck of with light.environment, light.dynamic and light.static are just in Light.hlsl instead of own internal files
Move shadow functions to Shadow.hlsl, much like BRDF.hlsl, will make it easy for us to upgrade, move LightMap definitions to Light.hlsl
Lightmapping definiton should be in shadingmodel.hlsl not Material.hlsl, that works only as a contract to shadingmodels, fix toolvis on shadingmodelstandard
DynamicLight refactor
Refactor StaticLight class, can do Light::From() to get all lights (static/dynamic) at once
https://i.imgur.com/jqko5ON.mp4
Remove more crumbs off S_MODE_TOOLS_VIS
Be able to fetch all light information with Light::Count() and Light::From(), while doing all optimization from tiled lighting etc
Move light.hlsl to common/classes/Light.hlsl, start unfucking it, make it have same structure as everything else
Nag message to remove S_MODE_TOOLS_VIS
Use single path for vr_common_ps_code to match what's on shadingmodel, eventually to just delete all of it, remove unused DISABLE_TONEMAPPING
Move BRDF stuff to BRDF.hlsl, organizes it and makes it easier to move to CS2's one with multiscatter
Fuck off with LightingTerms for toolsvis, we should be accepting any structure
Remove unused ShadingModel postprocessing ( handle it better )
ToolVis in a class
Single ToolsVis.hlsl, tidy it up
Initial ToolsVis without ToolsVis mode, cleanup some unsued
Goodbye S_MODE_TOOLS_VIS combo
Enumize ToolVis modes, dont keep this logic on shared_standard_ps_code
Shadingmodel uses Fog::Apply instead of duplicate DoAtmospherics
Add namespace_name to antlr grammar so that we can do "type Class::Function()" definition instead of defining all in class itself, we should just let it accept any HLSL
Handle AmbientLightKind::LightMapProbeVolume and AmbientLightKind::LightMap
Shading Complexity in ToolVis, quad overdraw isn't even working now, and certainly doesnt need it's own shading mode, can make all materials use same shader
Remove CUSTOM_MATERIAL_INPUTS and CUSTOM_TEXTURE_FILTERING, vfx optimizes it out if not used
Remove D_BAKED_LIGHTING_FROM_VERTEX_STREAM, never used
Rewrite AmbientLight into a class, stub
Remove CUSTOM_MATERIAL_INPUTS and CUSTOM_TEXTURE_FILTERING, vfx optimizes it out if not used
Remove D_BAKED_LIGHTING_FROM_VERTEX_STREAM, never used
Allow for inner feathering for EnvmapProbe in UI, same defaults for hammer equivalents of this
ggxcubemaphelper (cpu) is equivalent to cubemapper (gpu), increase sample count but use faster sampling and sample from first mip always
https://i.imgur.com/5UuaG0b.mp4
Sample from mips again and decrease sample count to not be absurd for our budget
Use custom mip filter that samples from neighbors for cubemapper
https://i.imgur.com/nn23dRG.png
Shading Complexity in ToolVis, quad overdraw isn't even working now, and certainly doesnt need it's own shading mode, can make all materials use same shader
Remove HighlightDeprecated from shaders, seems was never used?
Remove long unused shit from pixelinput and vertexinput and clean it up
Remove D_ENABLE_USER_CLIP_PLANE, complete bullshit, we use oblique projection matrices now
Use multi-bounce ambient occlusion
Feathering goes outer rather than center, allow to have inner (negative) feathering again, fixes light leaks in maps
SQRTRoughness was correct behavior for sampling envmaps
Remove long unused shit from pixelinput and vertexinput and clean it up
Convert world position to projected position on FinalizeVertex, don't like that these are opaque, let's see what we can do about it
SQRTRoughness was correct behavior for sampling envmaps
Use multi-bounce ambient occlusion
Feathering goes outer rather than center, allow to have inner (negative) feathering again, fixes light leaks in maps
Add namespace_name to antlr grammar so that we can do "type Class::Function()" definition instead of defining all in class itself, we should just let it accept any HLSL
Be able to fetch all light information with Light::Count() and Light::From(), while doing all optimization from tiled lighting etc
Move light.hlsl to common/classes/Light.hlsl, start unfucking it, make it have same structure as everything else
Initialize SSR to null on 3d skybox
Revert "Include ReflectionTextureColor in all the layers", it's unlikely we can manage to do SSR with roughness fast on translucents, and this causes the issue that SSR reflections from opaques will be drawn over smoke or translucents
This reverts commit 8cce50baf03cd7f93e7c89c75dde46319412aff9.
Add ScreenSpaceTrace as a generic, simpler class for doing screen space ray tracing, move reflections.hlsl to use it
Fix overriding SSR with a black texture when it should be initialized with a translucent one
Remove unused shit from lightbinner and make everything enums
Adjustments to cubemap normalization, make cubemap feathering happen from center of cubemap, and in world units, rather than inner, math is much simpler
Clamp cube box parallax projection to actual bounds box the box, cleanup
Our both our envmap filters uses linear roughness instead of sqrt roughness
Gizmo for scale in envmaps, adjust default for feathering in world units
Sort envmaps also by size, giving higher priority to smaller ones if it's in a draw condition
tiled light culling with edge feathering additions
vLevel isn't const
Update path of build-shaders, upload all shaders as artifacts
Fix EnvironmentMapLight::GetEnvMapColor using deprecated variable
Gamma correct samples during accumulated ggx, makes highlight less blown out and makes the cubemap more vibrant
Reenable MSAA fetching for SSAO compositing, don't use loops
Depthresolve takes first MSAA sample rather than doing min/max calculation, if we want depth::get we'd want the proper sample to compare perfectly on the screen
GTAO temporal filter uses edge detection to filter out edge ghosting
https://i.imgur.com/EzfclG7.mp4
Ao proxies removal (#1678)
* Remove aoproxies ambient occlusion, it never looked too right and it's stupid to have artists authoring them manually, almost no one did
I still think SDF AO works better than SSAO in most cases, but they should live as a renderhook and artists don't need to touch anything, the way it is now is very hard to maintain, it could be 10x simpler
* Remove sdf.hlsl (until we meet again 🫡 )
Remove aoproxies ambient occlusion, it never looked too right and it's stupid to have artists authoring them manually, almost no one did
I still think SDF AO works better than SSAO in most cases, but they should live as a renderhook and artists don't need to touch anything, the way it is now is very hard to maintain, it could be 10x simpler
Remove sdf.hlsl (until we meet again 🫡 )
Update shaders
Gamma correct samples during accumulated ggx, makes highlight less blown out and makes the cubemap more vibrant
Start moving same fast ggx filtering code to cpu for resourcecompiler also for consistency