Skip to content

[Material Editor] Feature inquiry: Recommended way to provide reusable shader property presets #396

Description

@tomTom1010EEE

Hi, I am developing a custom shader package for Koikatsu Sunshine and exposing its shaders through Material Editor's manifest.xml. However it has too many parameters so I am intended to setup a set of presets for users to start from.

I would like to provide several reusable property presets for the same underlying shader. For example:

  • Soft fabric
  • Smooth MatCap
  • Metallic accessory
  • Transparent clothing

Each preset would use the same shader program but initialize a different set of property values, such as shadow strength, smoothness, MatCap settings, specular settings, and render states.

Is there already a supported or recommended way to implement this in Material Editor?

The possible approaches I am considering are:

  1. Register multiple shader entries in manifest.xml with different display names, while all entries reference the same underlying Unity shader.
  2. Create multiple materials or prefabs that use the same shader but contain different default property values.
  3. Add separate ShaderLab shader aliases with different property defaults.
  4. Implement an external preset file or plugin integration, if Material Editor already provides such a mechanism.

Ideally, users could select something like lilToon - Soft Fabric or lilToon - Smooth MatCap and receive a predefined set of values without duplicating the shader implementation.

A few related questions:

  • Can manifest.xml define default values for shader properties?
  • Can multiple manifest shader entries safely reference the same shader asset while applying different defaults?
  • Does Material Editor support importing or applying a reusable group of property values?
  • Would separate preset materials/prefabs be the recommended solution?
  • Is there an existing API that another plugin could use to apply presets to the currently selected material?

I would appreciate any information about an existing solution or the approach that best fits Material Editor's architecture.

Environment:

  • Koikatsu Sunshine
  • Unity 2019.4.9f1
  • Material Editor
  • Custom shaders distributed through a zipmod

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions