File information

Last updated

Original upload

Created by

CS Team

Uploaded by

ProfJack

Virus scan

Safe to use

About this mod

Advanced Community Shaders feature which simulates large scale world-space ambient occlusion. Supports SE, AE, and VR.

Requirements
Permissions and credits


OVERVIEW


Advanced Community Shaders feature which simulates large scale world-space ambient occlusion. Supports SE, AE, and VR.

Skylighting, also known as large-scale ambient occlusion, is part of an extremely difficult set of rendering terms called Global Illumination.

Tech Focus: Global Illumination - What It Is, How Does It Work And Why Do We Need It?

Skylighting creates a soft ambient shadowing effect under structures and dense woods, enhancing contrast and realism in areas without direct lighting, which is tied into every part of Community Shaders to achieve a significantly more advanced lighting model.

Rather than using existing rendering techniques we created our own from scratch, which is significantly more advanced than our original design goals. Out of every feature we have created, this is the most transformative.


COMPARISON WITH ENB

People will know the phrase from ENBSeries so we used the same term, however the effects are implemented very differently. ENB uses the shadow map. This only works properly around midday and midnight. Any other time it will be broken because skylighting will shadow everything at an angle. ENB presets pretty much disable skylighting at sunrise and sunset because it covers the whole map in darkness.
  • ENB only does skylighting from one direction. Community Shaders does skylighting from every direction.
  • ENB skylighting is computationally expensive to do each frame. Community Shaders tries to spread out the computational cost over multiple frames which may result in infrequent frametimes as a side effect. In the future we might spread it out better.


Visualisation of shadow-based and CS Skylighting at a low sun angle with a minimum ambient value of 0, not reflective of either in practical use.


WETNESS

When using Wetness Effects areas under cover will be dry. This means no puddles in sheltered areas. In the future this may be used for snow/frost effects.




DYNAMIC CUBEMAPS

Skylighting can be used to know when the sky cannot see an object. This is used with dynamic cubemaps to stop the sky rendering on reflections when it makes no sense.




WATER

Water gains similarly improved reflections, and as a bonus it also gets volumetric ambient lighting.



EFFECTS

Effects like fog and smoke get skylighting, which means they no longer glow in the dark.



ALGORITHM


TL;DR
Baking visibility probes progressively in real time with rasterized unidirectional rays.

Longer Read

At a rate of roughly 30 frames per second, it progressively averages directional shadows from different light angles, to approximate how ambient light is occluded by objects surrounding every location, and stores the information as spherical harmonics in a grid roughly centred at the camera. The occlusion info can then be (stochastically) interpolated for the use of large scale ambient occlusion and removing wetness under roofs.

Denoising is not required, however if using temporal anti-aliasing, FSR or DLSS, spatio-temporal blue noise will jitter the skylighting to blur it effectively for free.


How is it different from SSGI?
  • The ambient occlusion (AO) in SSGI is smaller-scale, screen-space and dynamic.
  • The AO from skylighting is larger-scale, doesn't depend on info in the screen, and won't change with camera movement. Only static objects (houses, trees, landscape, etc.) can occlude the light, and dynamic objects only receive the occlusion.
  • Additionally, skylighting can affect transparent objects and water, and it is disabled in interiors because there is no sky.
  • It is recommended to combine them both for the full effect, plus indirect light (IL) from SSGI which accounts for bounced light.


COMPATIBILITY

Compatible with everything.

Moving or toggling objects may create issues. There are no known issues yet but it is a possibility. Skylighting will try not to render occlusion for dynamic objects and will constantly update to mitigate this.


REQUIREMENTS

Community Shaders
Designed to be used with Screen Space Global Illumination but not required.


CREDITS

ProfJack for the core algorithm
doodlum for RE, blurring, fixes and random ideas
jonahex for RE
FlayaN for VR support
NVIDIAGameWorks/SpatiotemporalBlueNoiseSDK