This is a plugin that loads custom unity shader from assetbundle.
It works on person atoms, clothing items (via @Stopper 's clothing plugin manager) and CUAs.
How to use:
Where do I get the shader assetbundles?
I have one posted here:
hub.virtamate.com
I plan to post a couple of more in coming months.
I hope with this plugin more people will try their hands at create custom shader for different scenarios.
For creators, how to create shader for this plugin:
1. For CUA, as long as the shader runs fine in Unity 2018.1, it should be compatible in VaM.
2. For shaders meant for person's skin and clothing, you need to write the shader in a certain way to make use of VaM's internal vertex buffers, otherwise you will see the dreaded T-Pose problem. I will soon post a guide and a template to create such.
3. Once the shader is done, create an assetbundle with the shader.
In additional to the shader assetbundle, the shader author should also prepare a json file containing shader properties info. This file is for the plugin to read and spawn corresponding control UIs to configure shader properties at runtime. We have to do this due to Unity version limitation that shader properties are not accessible at runtime.
The json file should look like below:
Currently it supports float, range, vector, texture, color. I plan to add support for toggle boolean later
You should name the json file <Shader_Name>.json. put it at the same directory as the assetbundle. When the shader with the same name is loaded, the json file will be picked up and you should see property controls on the right.
You don't need to put all properties in the json, just the ones you want control over at run time.
If the assetbundle is in a var and/or you need to put the json file elsewhere, you can manually load the json file using the "Load Shader Properties" button
Known issue:
If plugin is loaded on a person configured to replace skin/cloth, then saved in a scene. Upon loading the scene the shader replacement will not be applied. Rechecking the material box and rescanning clothing will will get it back on.
I will fix this in next update.
Due to how clothingplugnmanager handles json restores, when a person atom has the plugin loaded, and simultaneously the person has a clothing item loaded the plugin as clothing plugin, the storeId of the scripts can collide and will cause issue when loading preset from clothingplugnmanager.
For now please avoid such use case, i.e. don't use the plugin both as person plugin and clothing plugin on the same person.
I will resolve this in coming updates by separating person plugin and clothing plugin code.
Please try this out and report any issue. Thanks!
Here is credit to all creators whose resource I referenced when creating this plugin:
hub.virtamate.com
hub.virtamate.com
hub.virtamate.com
hub.virtamate.com
It works on person atoms, clothing items (via @Stopper 's clothing plugin manager) and CUAs.
How to use:
1. load the plugin on a person plugin
2. go into UI
3. click on "Select Load Shader Bundle" and pick an assetbundle that has a shader.
4. choose shader from "Select Shader" popup
5. if you want to replace shader on the person's skin:
check "Show Skin Material Slots"
then check any material you want the custom shader on
WARNING: DO NOT SIMULTANEOUSLY ENABLE SHADER REPLACMENT ON SKIN AND OTHER PLUGINS THAT ALSO REPLACES SKIN SHADERS (i.e. @Hunting-Succubus 's SSS skin, anime-cell effect etc.)
6. if you want to replace shader on person's active clothing items:
pick clothing items from "Select Clothing item" popup
Clothing's material slots will show. By default they are all checked and the shader should be applied. Uncheck based on what material you want shader on.
7. Once the shader is loaded and if the shader property json file (explained more below) is properly prepared, control UIs will show up on right side of the panel:
8. adjust UIs to achieve your desired result.
9. you can now save plugin preset for future use from VaM's plugin preset tab.
2. go into UI
3. click on "Select Load Shader Bundle" and pick an assetbundle that has a shader.
4. choose shader from "Select Shader" popup
5. if you want to replace shader on the person's skin:
check "Show Skin Material Slots"
then check any material you want the custom shader on
WARNING: DO NOT SIMULTANEOUSLY ENABLE SHADER REPLACMENT ON SKIN AND OTHER PLUGINS THAT ALSO REPLACES SKIN SHADERS (i.e. @Hunting-Succubus 's SSS skin, anime-cell effect etc.)
6. if you want to replace shader on person's active clothing items:
pick clothing items from "Select Clothing item" popup
Clothing's material slots will show. By default they are all checked and the shader should be applied. Uncheck based on what material you want shader on.
7. Once the shader is loaded and if the shader property json file (explained more below) is properly prepared, control UIs will show up on right side of the panel:
8. adjust UIs to achieve your desired result.
9. you can now save plugin preset for future use from VaM's plugin preset tab.
Before using this as a clothing plugin, read @Stopper 's guide here first:
hub.virtamate.com
After creating or modified existing clothing to have clothing plugin manager loaded.
1. Load CustomShaderLoader plugin to clothing items:
2. Load shader from assetbundle
3. Choose which shader
4. choose which material of the clothing you want the shader applied
5. adjust shader property control for desired look
6. Save plugin via ClothingPluginManager. When saved as default. The plugin and shader will automatically load when clothing is put on
This is the recommended way to use this plugin on clothing items. Once setup, all you need to do is to put on the clothing.

Clothing Plugins - Guides -
What is a "Clothing Plugin"? It turns out that you can trick VAM into loading plugins when an item of clothing is loaded. These plugins don't go into the default Atom plugin UIs and are generally their own separate thing. What can I do with a...

After creating or modified existing clothing to have clothing plugin manager loaded.
1. Load CustomShaderLoader plugin to clothing items:
2. Load shader from assetbundle
3. Choose which shader
4. choose which material of the clothing you want the shader applied
5. adjust shader property control for desired look
6. Save plugin via ClothingPluginManager. When saved as default. The plugin and shader will automatically load when clothing is put on
This is the recommended way to use this plugin on clothing items. Once setup, all you need to do is to put on the clothing.
1. Load the CUA first
2. load the plugin on the CUA
3. Load shader from assetbundle
4. Choose which shader
5. choose which material of the clothing you want the shader applied
6. adjust shader property control for desired look
7. To save preset, since CUA cannot save plugin preset, you'll need to use @Blazedust 's Custom Unity Asset Manager plugin to save a preset.
hub.virtamate.com
2. load the plugin on the CUA
3. Load shader from assetbundle
4. Choose which shader
5. choose which material of the clothing you want the shader applied
6. adjust shader property control for desired look
7. To save preset, since CUA cannot save plugin preset, you'll need to use @Blazedust 's Custom Unity Asset Manager plugin to save a preset.

CUAManager - Plugins + Scripts -
This plugin requires VAM 1.22.0.0 or later! If you're still using VAM 1.21.1.0 or older (like VAM 1.20.77) download the older plugin version v.17 from the history tab instead or you will get the following error: Type `SuperController' does not...

Where do I get the shader assetbundles?
I have one posted here:

Custom Shader - Stocking/Pantyhose - Assets + Accessories -
This is a custom shader designed for skin tight, semi-transparent clothing, namely, stocking and pantyhose. VaM Default Shader: Custom Shader: It should be used with this plugin...

I plan to post a couple of more in coming months.
I hope with this plugin more people will try their hands at create custom shader for different scenarios.
For creators, how to create shader for this plugin:
1. For CUA, as long as the shader runs fine in Unity 2018.1, it should be compatible in VaM.
2. For shaders meant for person's skin and clothing, you need to write the shader in a certain way to make use of VaM's internal vertex buffers, otherwise you will see the dreaded T-Pose problem. I will soon post a guide and a template to create such.
3. Once the shader is done, create an assetbundle with the shader.
In additional to the shader assetbundle, the shader author should also prepare a json file containing shader properties info. This file is for the plugin to read and spawn corresponding control UIs to configure shader properties at runtime. We have to do this due to Unity version limitation that shader properties are not accessible at runtime.
The json file should look like below:
Code:
[
{
"name": "property_name",
"displayName": "Display Name",
"type": "color"
},
{
"name": "float_property",
"displayName": "Float Property",
"type": "float",
"defaultValue": 0.5,
"minValue": 0.0,
"maxValue": 1.0
},
{
"name": "range_property",
"displayName": "Range Property",
"type": "range",
"defaultValue": 0.5,
"minValue": 0.0,
"maxValue": 1.0
},
{
"name": "texture_property",
"displayName": "Texture Property",
"type": "texture"
},
{
"name": "vector_property",
"displayName": "Vector Property",
"type": "vector",
"defaultVector": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"minVector": {
"x": -1.0,
"y": -1.0,
"z": -1.0
},
"maxVector": {
"x": 1.0,
"y": 1.0,
"z": 1.0
}
}
]
Currently it supports float, range, vector, texture, color. I plan to add support for toggle boolean later
You should name the json file <Shader_Name>.json. put it at the same directory as the assetbundle. When the shader with the same name is loaded, the json file will be picked up and you should see property controls on the right.
You don't need to put all properties in the json, just the ones you want control over at run time.
If the assetbundle is in a var and/or you need to put the json file elsewhere, you can manually load the json file using the "Load Shader Properties" button
Known issue:
I will fix this in next update.
Due to how clothingplugnmanager handles json restores, when a person atom has the plugin loaded, and simultaneously the person has a clothing item loaded the plugin as clothing plugin, the storeId of the scripts can collide and will cause issue when loading preset from clothingplugnmanager.
For now please avoid such use case, i.e. don't use the plugin both as person plugin and clothing plugin on the same person.
I will resolve this in coming updates by separating person plugin and clothing plugin code.
Please try this out and report any issue. Thanks!
Here is credit to all creators whose resource I referenced when creating this plugin:

Clothing Plugin Manager - Plugins + Scripts -
A helper plugin that smooths out the rough edges with Clothing Plugins. Does a couple of useful things Sets up references to prevent startup errors Sets up a 'destructor' to clean up on forced reload Adds a "Plugins" UI tab to the clothing...


ColorScale - Plugins + Scripts -
Attach the plugin (ColorScaleC inside the var package) to a CustomUnityAsset atom to be able to change color/scale on individual components. Coloring is optional in this plugin and disabled by default but can be enabled. For a more feature rich...


Anime/Cell Effect - Plugins + Scripts -
Support at Ko-fi Support at Patreon Rias by OniEkohvius. Rias by OniEkohvius. This Plugin add Anime/Cell Effect to Person's Skin. I am Looking forward to make it more usable in future. Stay Tuned. Instruction - Add Plugin -...


MacGruber Utils - Plugins + Scripts -
Collection of various utility functions helpful for plugin development. You should not need to manually download this, unless you are a plugin creator. This is a separate release of my MacGruber_Utils.cs which I'm using in most of my plugins. I...
