Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/VRLabs/Simple-Shader-Inspectors
Unity library to make shader inspector creation easier
https://github.com/VRLabs/Simple-Shader-Inspectors
shader shader-inspector unity
Last synced: 2 months ago
JSON representation
Unity library to make shader inspector creation easier
- Host: GitHub
- URL: https://github.com/VRLabs/Simple-Shader-Inspectors
- Owner: VRLabs
- License: mit
- Created: 2020-07-06T21:41:22.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2023-11-27T15:24:46.000Z (about 1 year ago)
- Last Synced: 2024-08-03T05:15:42.064Z (6 months ago)
- Topics: shader, shader-inspector, unity
- Language: C#
- Homepage: https://ssi.vrlabs.dev/
- Size: 4.91 MB
- Stars: 18
- Watchers: 6
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Simple Shader Inspectors
Unity Editor library with the objective to make medium to complex shader inspectors easier to create and manage.
## How to use
To use the library you need to create a shader inspector by substituting `ShaderGUI` with `SimpleShaderInspector`.
Here is a quick example of how a simplistic shader inspector code looks.
```csharp
using UnityEngine;
using UnityEngine;
using VRLabs.SimpleShaderInspectors;public class TestShaderInspector : SimpleShaderInspector
{
private PropertyControl _floatControl;
private LabelControl _labelControl;public override void Start()
{
_floatControl = this.AddPropertyControl("_FloatProperty").WithAlias("MyFloatProperty");
_labelControl = this.AddLabelControl("MyLabel");
}public override void StartChecks(MaterialEditor materialEditor)
{
_labelControl.SetEnabled(_floatControl.Property.FloatValue > 1);
}public override void CheckChanges(MaterialEditor materialEditor)
{
if(_floatControl.HasPropertyUpdated)
{
_labelControl.SetEnabled(_floatControl.Property.FloatValue > 1);
}
}
}
```The above inspector has 2 controls, with the control displaying a label being displayed only when the material property `_FloatProperty` float value is above 1. The full guide that explains how all of this works can be found on the official [Documentation](https://ssi.vrlabs.dev).
We do also provide some more examples available to download in [Releases](https://github.com/VRLabs/SimpleShaderInspectors/releases/latest).
## Current state
Right now Simple Shader Inspectors is in a functional beta state, what does it mean? It means that it is a fully functional library that, if it satisfies your needs, can be used outside of pure testing enviroments, but it is not feature complete and it will for sure have multiple breaking changes before getting out of the beta state.
## License
Simple Shader Inspectors is available as-is under MIT. For more information see [LICENSE](https://github.com/VRLabs/SimpleShaderInspectors/blob/master/LICENSE).
## Downloads
There are 3 packages available in [Releases](https://github.com/VRLabs/SimpleShaderInspectors/releases/latest):
- **Simple Shader Inspectors:** base library for the end user.
- **Simple Shader Inspectors dev:** development vesion for shader creators, contains some extra tools compared to the base library.
- **Example inspectors:** good place to start looking on how the library works, requires one of the 2 packages above in order to work.You can also download the repository itself, but unless you're looking into contributing in the project it is highly discouraged since it will very likely not end up in the right folder, possibly ending up causing problems later down the road.
## Contributors
You want to help improve the library by adding more controls and/or fixing existing bugs? Feel free to contribute by sending a pr! We are always looking for improvements to the library!
Made with [contributors-img](https://contributors-img.web.app).
## Showcase
These Shaders are using Simple Shader Inspectors for their editors, check them out!
* [VRLabs Particle Shader](https://github.com/VRLabs/VRChat-Avatars-3.0) by [@VRLabs](https://github.com/VRLabs), our in house particle shader (at the moment the inspector is available only in the source code on github).
Made an awesome shader using Simple Shader Inspector and want to show it off? Join our [Discord](https://discord.gg/THCRsJc) and show it to us! If we like it we may add it to this list!