How to prepare the shader

If you need a custom shader and want to use it the same way as the predefined materials, you should start by copying the Standard.shader from "Assets/TheraBytes/BetterUI/Runtime/Resources/Materials" and modify the copy.

Please note that you can have a maximum of 3 float parameters for your shader (in addition to the default stuff like Color).

As mentioned in About Materials your parameters can be the x and/or y value of TEXCOORD1 as well as the w value of TANGENT semantics in the appdata_t struct (check out the HueSaturationBrightness shader to see how it is used there).

How to add it to the drop down

Create a material from your shader, then open the Material Definitions and do the following:

      1. Increase the Size of Materials by one.
      2. Expand the last material definition
      3. Give it a Name in the Name filed (This name will be displayed in the Image’s dropdown)
      4. Drag and Drop your Material in the Material field
      5. Expand Properties and Float Properties
      6. Insert the number of smart Properties in the Size field (maximum: 3)
      7. For each Property Field do the following:
        1. Enter the Name of the Property in the Name field (Label for the Property in the Image Inspector)
        2. Enter the default value in the Value field
        3. Select the Vertex variable where this property maps to in the Property Map dropdown
        4. If you want to display a slider in the Image Inspector for the property, you can define the Min and Max values in the respective fields. If Max is smaller or equal Min, any number can be chosen without a slider.