JasonMa0012 / LWGUI
A Lightweight, Flexible, Powerful Shader GUI System for Unity.
AI Architecture Analysis
This repository is indexed by RepoMind. By analyzing JasonMa0012/LWGUI in our AI interface, you can instantly generate complete architecture diagrams, visualize control flows, and perform automated security audits across the entire codebase.
Our Agentic Context Augmented Generation (Agentic CAG) engine loads full source files into context on-demand, avoiding the fragmentation of traditional RAG systems. Ask questions about the architecture, dependencies, or specific features to see it in action.
Repository Overview (README excerpt)
Crawler viewLWGUI (Light Weight Shader GUI) 中文 | English A lightweight, flexible, and powerful **Unity Shader GUI** system built to maximize material inspector productivity. LWGUI has been proven in many large-scale commercial projects: with concise Material Property Drawer syntax, you can build complex inspectors quickly while benefiting from a modular Drawer/Decorator extension architecture, robust MetaData lifecycle caching, a complete Ramp/Preset/Toolbar toolchain, and Timeline integration. It significantly shortens iteration cycles while improving collaboration between artists and technical artists. | | | | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------- | | A more powerful Gradient editor than UE, with support for both Shader and C# | **NEW: Use Ramp Atlas to include multiple Ramps in one Texture** | | | | | **NEW: When recording material parameter animations in Timeline, automatically capture changes to Toggle's Keywords to enable switching material Keywords at runtime.** | Feature-rich toolbar | | With your sponsorship, I will update more actively. | 有你的赞助我会更加积极地更新 | | --------------------------------------------------- | ----------------------------------------------------------------------------------------- | | paypal.me/JasonMa0012 | | • LWGUI (Light Weight Shader GUI) • Installation • Getting Started • Basic Drawers • Main & Sub • Extra Drawers • Numeric • SubToggle • SubPowerSlider • SubIntRange • MinMaxSlider • KWEnum • SubEnum & SubKeywordEnum • Preset • RampAtlasIndexer • Texture • Tex • Ramp • ShaderLab • C# • Gradient Editor • RampAtlas • Ramp Atlas Scriptable Object • Image • Vector • Color • Channel • Other • Button • Extra Decorators • Appearance • Title & SubTitle • Tooltip & Helpbox • ReadOnly • HelpURL • Logic • PassSwitch • Structure • Advanced & AdvancedHeaderProperty • Condition Display • Hidden • ShowIf • ActiveIf • LWGUI Timeline Tracks • MaterialKeywordToggleTrack • Unity Builtin Drawers • Space • Header • Enum • IntRange • KeywordEnum • PowerSlider • Toggle • FAQs • Problems Occurred After Modifying the Material in the Code • Problems Occurred After Creating the Material in the Code • Custom Shader GUI • Custom Header and Footer • Custom Drawer • Contribution • Development Guide • Data Structure (Shader > Material > Inspector) • Lifecycle Installation • Make sure your environment is compatible with LWGUI • LWGUI =1.17: **Unity 2021.3+** • **Recommended minimum version: Unity 2022.2+, lower versions can be used but may have bugs** • Open your project • , enter: • You can also choose to manually download the Zip from Github,then: • For Unity 2017, please extract the Zip directly to the Assets directory Getting Started • Create a newer or use the existing Shader • Open the Shader in the code editor • At the bottom of the Shader, before the last large bracket, add line: • Completed! Start using the following powerful Drawer to easily draw your Shader GUI • MaterialPropertyDrawer is C#-like attribute syntax, it can be used in front of shader properties to change the drawing method, more information can be found in the official documentation • You can refer to the example Shaders in the Test directory • ***Please note: Each Property can only have one Drawer, but can have multiple Decorators*** Basic Drawers Main & Sub Example: Default result: Then change values: Extra Drawers Numeric SubToggle SubPowerSlider SubIntRange MinMaxSlider Example: Result: KWEnum SubEnum & SubKeywordEnum Preset Example: Result: The Property Value in the selected Preset will be the default value: Create Preset File Edit Preset BitMask Example: Result: > [!CAUTION] > If used to set Stencil, it will conflict with SRP Batcher! > (Reproduced in Unity 2022) > > SRP Batcher does not correctly handle multiple materials with different Stencil Ref values, > mistakenly merging them into a single Batch and randomly selecting one material's Stencil Ref value for the entire Batch. > In theory, if different materials have different Stencil Ref values, they should not be merged into a single Batch due to differing Render States. > > Solution: > > - Force disable SRP Batcher by setting the Material Property Block > - Place materials with the same Stencil Ref value in a separate Render Queue to ensure the Batch's Render State is correct RampAtlasIndexer `c# /// Visually similar to Ramp(), but RampAtlasIndexer() must be used together with RampAtlas(). /// The actual stored value is the index of the current Ramp in the Ramp Atlas SO, used for sampling the Ramp Atlas Texture in the Shader. /// /// group: parent group name. /// rampAtlasPropName: _...truncated for preview_