Skyrim Special Edition

File information

Last updated

Original upload

Created by

doodlez alandtse

Uploaded by

doodlum

Virus scan

Safe to use

About this mod

Community Shaders feature which makes dynamic lights unlimited, adds particle lights, contact shadows, shadows for first-person torches and light spells, and more. Supports SE, AE, and VR.

Requirements
Permissions and credits


OVERVIEW


Community Shaders feature which makes dynamic lights unlimited, adds particle lights, contact shadows, shadows for first-person torches and light spells, and more.

      

PREFACE

This project is the result of months of work on the Community Shaders and my own personal journey into learning more advanced C++, DirectX 11 and HLSL programming, and collaboration via GitHub. This release would only have been possible with the help of alandtse who went above and beyond to support not just VR, but to improve Community Shaders in so many ways. Nukem was a major contributor by documenting major parts of the renderer and offering additional support. Jonahex provided the base for Community Shaders. powerofthree reversed the particles which means particle lights were only possible without their major contributions to CommonLibSSE.


FEATURES

Please note: The shadow limit is not yet unlocked.

  • Custom clustered shading implementation for high-performance, scalable lighting. Starfield uses this too!
  • Unlimited dynamic light sources such as torches and magic lights.
  • Doubled the portal-strict light limit (7 to 15). Split meshes are no longer required.
  • Full support for "ENB light" particle lights.
  • Extended particle lights system via configuration files.
  • Particle lights affect NPC detection.
  • Contact shadows for all lights.
  • Shadows for first-person torches and light spells.
  • High-performance lighting for grass.
  • Full VR support thanks to @alandtse!
  • Visualisation of the remaining light limit to determine where split meshes are still required.

LIMITATIONS

  • The shadow limit is not increased. If it is, that will be a separate project.
  • Some lights cannot used clustered rendering, but should be increased in the future when a vanilla bug is fixed.
  • Effect shaders are not covered yet. I do not know if they have the same issue.
  • Water shaders are not covered yet but will reflect all lights.


CLUSTERED SHADING

Clustered shading requires a small performance hit to scale much better than forward or deferred shading.

Clustered shading is the magic which makes this project possible. This is what lets us have completely bug-free, scalable lights, to achieve a true light limit fix and optimised particle lights. In the Particle Lights section, the benefits of this system will become more apparent. If you would like to learn about the benefits of clustered shading, you can read an intuitive article here: A Primer On Efficient Rendering Algorithms & Clustered Shading



Here is a visualisation of lights handled by clustered shading when using ELFX Shadows. The red squares indicate where the light limit was reached. None of these lights now contribute to the light limit, they are unlimited.

Clustered shading was implemented based on advice from mwilsnd / Ultra, the GitHub projects pezcode/Cluster and mateeeeeee/Adria-DX11, and the presentation Practical Clustered Shading.


UNLIMITED DYNAMIC LIGHTS

Any light which is not flagged as "portal strict" doesn't contribute to the light limit. Any lights flagged as "portal strict" still do, but this is planned to be unlocked in the future when a vanilla bug is fixed.

Expect all torches, projectiles, hazards and exterior lights to have no restriction. A lot of lights in interiors are still not fixed, but will now no longer conflict with any dynamically placed lights.


UNLIMITED MAGIC LIGHTS

The limit of only 4 magic lights has been increased to 2,147,483,647. Now, every actor in the game can cast a light without any restriction. In this example, Luminous Atronachs is used.




PARTICLE LIGHTS

Particle lights are designed to be fully backwards-compatible with "ENB light" meshes by using reversed information about the renderer to reconstruct the light colour on the CPU to create true light sources which can be used in the clustered shading system, and detected by NPCs.

This means that any mod which offers "ENB light" is compatible with the Light Limit Fix, such as the mods ENB LightENB Lights For Effect Shaders, and the Rudy102 "ENB Light" series.

Due to how these lights were designed, they have numerous benefits over the ones provided by "ENB":

  • Uses clustered shading over deferred shading to be much more scalable. 
  • True specular lighting so that metallic surfaces are lit correctly, as well as hair.
  • Supports parallax shadows via Complex Parallax Materials.
  • Transparent objects such as glass and Blended Roads can receive lighting from particle lights.
  • First-person meshes can emit light.
  • Disables rendering particle light meshes to completely eliminate overdraw, massively increasing performance.
  • No FOV issues or distortion.
  • No false-positive lights, e.g. white flickering torches.
  • No restriction on radius, lights can be of any size.

The Light Limit Fix also contains some cool additions:

  • Particle lights can be attached to any effect shader via configuration files to add new particle lights without touching any meshes.
  • Billboard lights can have a flickering effect via configuration files to replace inefficient particle emitters. 
  • Can be detected by NPCs for stealth and gameplay purposes.



Particle lights were implemented based on the documentation A Guide to Skyrim Particle Systems and ENB Complex Lights and information provided by Rudy102 and fadingsignal.


CONTACT SHADOWS


Disabled by default.

Every light in the game can now cast small shadows in screen-space.

Contact shadows are designed to have the lowest performance cost possible, but are completely smooth when TAA or the Skyrim Upscaler is used, by using temporal accumulation.




FIRST-PERSON SHADOWS

Disabled by default.

Torches and light spells in first-person and can now cast approximated shadows in screen-space due to the perspective of the light source closely matching that of the first-person camera. 





VR SUPPORT

VR is fully supported without compromise. Please note that there may be a larger performance impact in VR.


LIGHT COUNT VISUALISATION

To enable visualisations you must add the shader define LLFDEBUG in the advanced settings menu.

3 different options for visualising lights are offered:
  • Visualise the light limit; Red when the "strict" light limit is reached (portal-strict lights).
  • Visualise the number of strict lights.
  • Visualise the number of clustered lights.


REQUIREMENTS

Community Shaders
SSE Engine Fixes to fix vanilla bugs
Grass Lighting to receive lights on grass


CREDITS

doodlez
: Responsible for the original implementation of all listed features outside of VR.
alandtse: VR support, refactoring, bug fixes, miscellaneous improvements.

Nukem: Documenting the renderer, additional support.
jonahex: Original RE of lighting and grass shaders.
powerofthree: RE of particles, contributions to CommonLibSSE.

rudy102 and fadingsignal: Information about particle lights.
mwilsnd / Ultra: Suggestions and feedback about clustered shading.


REFERENCES

A Primer On Efficient Rendering Algorithms & Clustered Shading
Practical Clustered Shading
pezcode/Cluster
mateeeeeee/Adria-DX11
Turbo, An Improved Rainbow Colormap for Visualization – Google Research Blog

Screen space shadows

A Guide to Skyrim Particle Systems and ENB Complex Lights