Description
Changelog
Reviews
CGLF — Custom Global Light Function
Provides a manager to define and customize a single centralized custom global light() function shared across all or chosen shaders in the project.
Why use this plugin?
- Development friendly manager to keep consistent lighting throughout your project. No more copy and paste nightmares!
- Change your lighting logic in one place and it automatically updates on all shaders files!
- No extra resources cost for running screen-space lighting logic. More FPS, more happiness!
Features
- Define a global
light()function once and reuse it everywhere. - Easily managed through the plugin dock.
- Create as many
light()profiles as desired, called CLF (Custom Light Function). - Choose which shader types get affected.
- CLLF (Custom Local Light Function) allows for smaller, isolated environments where one
light()affects only desired shaders. - Blacklist for shader files not meant to be affected by CLF.
- Currently only
.gdshaderfiles are supported.
Installation
A — Asset Library
- Add the plugin to your project via the Asset Library.
- In Godot, go to Project → Project Settings → Plugins and enable CGLF — Custom Global Light Function.
B — Repository
- Download or clone this repository.
- Copy the
addons/cglf_custom_global_light_functionfolder into your Godot project. - In Godot, go to Project → Project Settings → Plugins and enable CGLF — Custom Global Light Function.
Usage
- Find the plugin's dock on Godot's right dock.
- Usage:
- Create CLF → To start create a CLF.
- Edit → Open the
.gdshaderincfile to edit. - Copy Injection Code → Copies include boiler plate to clipboard for manually addition.
- Inject Shaders → Injects all shaders with CLF's current settings.
- CLLF → Converts the CLF into a CLLF, changing it to a Custom Local Light Function which affects only shaders whitelisted.
- Replace Existing Light Functions → Automatically replaces
light()functions already present in shaders. - Shader Types → List of shader types to be affected by the current CLF.
- Blacklist → List of shaders to exclude.
- Whitelist → List of shaders to be affected only by the current CLF.
Planned Future Additions
- Add support for in-scene saved Shaders
- Add support to Materials
- Add support to visual shaders
Changelog for version v1.0.0
No changelog provided for this version.