ltcgi
ltcgi copied to clipboard
Optimized plug-and-play realtime area lighting using the linearly transformed cosine algorithm for Unity/VRChat.
LTCGI
Optimized plug-and-play realtime area lighting using the linearly transformed cosine algorithm for Unity/VRChat. Free to use with attribution.
NOTE: While the shader is optimized, it still equates to real-time lighting - so use sparingly, and read the Wiki on performance optimization!
Join the Discord for support or other questions: https://discord.gg/r38vJd2DuJ

You can download the standalone demo app pictured above to try it out for yourself.
Alternatively, join the demo world in VRChat.
Supported shaders
To use LTCGI, all objects that should receive lighting must use a compatible shader. Currently compatible ones are listed below. If you implement LTCGI into your shader, feel free to send a PR to be included.
- ORL Shader Family by @orels1
- Silent's Filamented
- Mochie's Unity Shaders
- Hekky Shaders
- Basic "Unlit" Test Shader (included)
- Surface Shader (included)
How to use / Download
See the Wiki for instructions. Please check it out before using LTCGI!
Also consider the attribution requirements.
Check the Releases tab for downloads.
Dependencies for VRChat
You do not need those if you plan to use LTCGI in a standalone Unity project!
In that case, just make sure your color space is set to linear:

Debug builds
NOTE: These are provided as-is with no guarantees. Feel free to report any issues on the Discord, but remember that it is explicitly recommended to use the downloads from the Releases tab instead!
Check the latest build from the Actions tab and download the corresponding artifact (comes as a zip you need to extract first).
Attribution
According to the License you are free to use this in your world, but you need to give credit. You are free to do so in whichever way, but you must provide a link to this GitHub repository, such as to fulfill the imported license of the LTC example code used as a base for this project.
For your convenience, a prefab called LTCGI Attribution is provided in the package.

If you don't want to use it, instead display text similar to the following:
This project/world uses LTCGI by _pi_, see 'github.com/pimaker/ltcgi'.
LTC
Based on this paper:
Real-Time Polygonal-Light Shading with Linearly Transformed Cosines.
Eric Heitz, Jonathan Dupuy, Stephen Hill and David Neubelt.
ACM Transactions on Graphics (Proceedings of ACM SIGGRAPH 2016) 35(4), 2016.
Project page: https://eheitzresearch.wordpress.com/415-2/
Screenshots

(venue designed by BananaBread)

(various surfaces)

(static textures, shadows and glass)
License
This project is made available under the terms of the MIT license, unless explicitly marked otherwise in the source files. See LICENSE for more.
The following files are licensed explicitly, and may not be modified or used in commercial projects, but can be redistributed and displayed otherwise, provided this license is kept:
- Propaganda/pi_graffiti.png
- Propaganda/ltcgi_graffiti.png

