• Hi Guest!

    We have posted a new VaM2 dev log on Patreon, starting a monthly cadence of written progress updates between Beta releases. Highlights include the new Gizmos System, Selection Carousel, and Modes System with Context-Specific Editing. Beta1.2 is 15 of 21 items complete.

    Read the full post on Patreon, or follow progress on the public Trello roadmap.
CustomShaderLoaderAlt

Plugins + Scripts CustomShaderLoaderAlt

Download [<1 MB]
1. What it does
On a single skin, clothing item, or CustomUnityAsset, Custom Shader Loader Alt lets you run several different custom shaders at the same time. Each shader slot drives only the materials you assign to it.

2. Quick start
  1. Add the plugin to a Person, a clothing item, or a CUA atom.
  2. Create and select a shader slot. Slot 0 is ready by default; use "+ Add Shader Slot" for more, then pick the active slot.
  3. Load the slot's shader and properties. Load Shader Bundle, Select Shader, then Load Shader Properties for its JSON (a same-named JSON auto-loads).
  4. Pick the target. Choose the skin, a clothing item, or the CUA whose materials you want to shade.
  5. Assign each material slot. On every material, use the dropdown to pick which shader slot drives it. Repeat steps 2 to 5 to mix more shaders.
Optional: Save Preset anytime to reuse a slot's parameters later.
IMG-1-ui-main.png

3. Key features
  • Multi-shader slots. Run different shaders on different materials at the same time.
  • Works everywhere. Person skin, clothing (DAZSkinWrap), and CustomUnityAsset, with a dedicated mode for each.
  • JSON-driven UI. Tabs, section headers, and 15+ control types built straight from a plain JSON file (see section 4).
  • Per-material assignment. A dropdown on every material picks which slot it belongs to.
  • Presets. Save and load a slot's full property set, with a thumbnail.
  • Tooltips. Hover help on every control, with a global Show Tooltips toggle.
  • VaM-ready. Supports StructuredBuffer skinning (no T-pose) and VaM SH / IBL lighting when the shader template implements them.
IMG-2-ui-dropdown-select.png
IMG-3-ui-dropdown-materialslot.png

4. Writing a shader property JSON
The properties file is a flat JSON array. Each entry is one UI element, processed top to bottom. Every entry has name (the shader property), displayName (the UI label), type, and an optional tooltip.
JSON:
[
  { "name": "",  "displayName": "Base", "type": "tab", "tabWidth": 110 },

  { "name": "",     "displayName": "Surface", "type": "label",
    "defaultColor": "#0d1117", "textColor": "#58a6ff", "height": 42, "fontSize": 26 },
  { "name": "note", "displayName": "Notes", "type": "info",
    "infoText": "Multi-line read-only help shown in the panel.", "height": 80 },

  { "name": "_Color",      "displayName": "Tint",       "type": "color",      "defaultColor": "white",
    "tooltip": "Any control can carry a tooltip. Shown on hover." },
  { "name": "_RimColor",   "displayName": "Rim (RGBA)", "type": "color_rgba", "defaultColor": "#80c0ffcc" },
  { "name": "_Glossiness", "displayName": "Smoothness", "type": "float",      "defaultValue": 0.5, "minValue": 0, "maxValue": 1,
    "tooltip": "Higher = sharper highlights" },
  { "name": "_Metallic",   "displayName": "Metallic",   "type": "range",      "defaultValue": 0, "minValue": 0, "maxValue": 1,
    "tooltip": "0 = dielectric, 1 = metal" },
  { "name": "_MainTex",    "displayName": "Albedo",     "type": "texture",    "defaultUrl": "", "wrapMode": "Repeat",
    "tooltip": "Base color texture" },
  { "name": "_Cube",       "displayName": "Reflection", "type": "cubemap",    "defaultAssetName": "" },

  { "name": "", "type": "separator", "thickness": 4 },

  { "name": "_Tiling",   "displayName": "UV Tiling", "type": "vector",
    "defaultVector": { "x": 1, "y": 1, "z": 0 },
    "minVector":     { "x": 0, "y": 0, "z": 0 },
    "maxVector":     { "x": 8, "y": 8, "z": 1 } },
  { "name": "_DetailST", "displayName": "Detail ST", "type": "vector4",
    "defaultVector4": { "x": 1, "y": 1, "z": 0, "w": 0 },
    "minVector4":     { "x": 0, "y": 0, "z": 0, "w": 0 },
    "maxVector4":     { "x": 8, "y": 8, "z": 1, "w": 1 } },

  { "name": "",  "displayName": "Effects", "type": "tab", "tabWidth": 110 },

  { "name": "", "displayName": "Toggles and enums", "type": "label",
    "defaultColor": "#0d1117", "textColor": "#f0883e", "height": 42, "fontSize": 26 },
  { "name": "_UseEmission", "displayName": "Emission", "type": "toggle",
    "defaultValueBool": false, "keyword": "_EMISSION_ON",
    "tooltip": "Toggles the _EMISSION_ON shader keyword" },
  { "name": "_CullMode",    "displayName": "Cull",     "type": "tristate",
    "defaultValue": 0, "stateCount": 3, "stateNames": { "0": "Both", "1": "Front", "2": "Back" },
    "tooltip": "0 both sides, 1 cull front, 2 cull back" },

  { "name": "_Angle",    "displayName": "Rotation", "type": "angle",       "defaultValue": 45, "minValue": 0, "maxValue": 360 },
  { "name": "_Steps",    "displayName": "Steps",    "type": "int",         "defaultValue": 2, "minValue": 0, "maxValue": 10, "stepValue": 1 },
  { "name": "_Distance", "displayName": "Distance", "type": "float_input", "defaultValue": 12.5, "minValue": 0, "maxValue": 1000 },

  { "name": "", "displayName": "Animation and tracking", "type": "label",
    "defaultColor": "#0d1117", "textColor": "#3fb950", "height": 42, "fontSize": 26 },
  { "name": "_CustomTime", "displayName": "Time anim",    "type": "time" },
  { "name": "_TargetPos",  "displayName": "Bone tracker", "type": "position" },

  { "name": "doReset", "displayName": "", "type": "button",
    "text": "Reset All", "buttonColor": "#aa3333", "action": "ResetProperties" },

  { "name": "legacy", "displayName": "", "type": "column" }
]
Control types (every type also accepts an optional tooltip):
TypePurposeKey fields
tabNew category tabtabWidth
labelSection headerdefaultColor (bg), textColor, height, fontSize
infoMulti-line read-only textinfoText, height
separatorHorizontal dividerthickness
float / rangeSliderdefaultValue, minValue, maxValue
intStepped integer spinner+ stepValue
float_inputPrecise value box (no slider)defaultValue, min/maxValue
angle0 to 360 degree dialdefaultValue, min/maxValue
tristateCycling N-state buttonstateCount, stateNames
colorHSV picker (no alpha)defaultColor (white or #hex)
color_rgbaHSV picker + alpha sliderdefaultColor (#RRGGBBAA) or defaultAlpha
textureTexture browserdefaultUrl, wrapMode (Repeat/Mirror/Clamp)
cubemapCubemap from the bundledefaultAssetName
vector / vector43- / 4-component slidersdefaultVector{x,y,z(,w)} plus min/maxVector
toggleBool, optional shader keyworddefaultValueBool, keyword
buttonStateless action buttontext, buttonColor, action
positionLive bone position/rotation tracker(none)
timeAuto time animation (writes _CustomTime)(none)
columnDeprecated. Kept for old JSON, now a no-op.(none)
Tip: name the JSON the same as your .assetbundle and drop it beside the bundle. It loads automatically when you pick the bundle.
Note: all types above work on Slot 0. On extra shader slots, position and time are not shown, and color_rgba, button and label have limited support for their default value, styling, or action.

Credits and acknowledgements
This plugin bundles a few open libraries. Thanks to their authors:
Images and attachments
  • icon.png
    icon.png
    415.7 KB · Views: 0
  • icon_src_2048.png
    icon_src_2048.png
    4.9 MB · Views: 0
React to this content...

Share this resource

More resources from lulu_c137

Latest updates

  1. Major Update!

    Added support for multi-shader loading. Added tooltip support. Added the ability to save shader...
  2. Cubemaps support

    New Property Type: cubemap — Load Cubemaps from AssetBundle New version adds the cubemap...
  3. bugs fixed

    Fixed known bugs and optimized the UI.

Latest reviews

Positive
Version: 3.0
Posted:
This seems powerful. I am not a creator but thank you giving people more abilities to create.
Upvote 0
Positive
Version: 2.0
Posted:
First of all, the original creator of the plug-in
I want to say thank you to reguise
After that, I would like to thank lulu_c137 for modifying and improving the plug-in for our hub user.
There are many key elements of the plug-in
It means that we have increased the resources to apply shaders.
Thank you very much.
Upvote 0
Back
Top Bottom