-
-
Notifications
You must be signed in to change notification settings - Fork 145
Expand file tree
/
Copy pathshader_manifest_template.xml
More file actions
212 lines (186 loc) · 7.66 KB
/
Copy pathshader_manifest_template.xml
File metadata and controls
212 lines (186 loc) · 7.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<!--
Material Editor shader-manifest template.
`schema-ver` is the Sideloader manifest version and remains 1.
`MaterialEditor SchemaVersion="2"` enables the additive UI metadata shown
below.
-->
<manifest schema-ver="1">
<guid>{{Mod GUID}}</guid>
<!-- Example: <guid>my.mod</guid> -->
<name>{{Mod name}}</name>
<!-- Example: <name>My Mod</name> -->
<version>{{Mod version}}</version>
<!-- Example: <version>1.2.3</version> -->
<author>{{Mod author}}</author>
<!-- Optional but recommended, example: <author>My Name</author> -->
<description>{{Mod description}}</description>
<!-- Optional, example: <description>A long text to introduce my mod.</description> -->
<website>{{Mod website}}</website>
<!-- Optional, example: <website>https://my.website.com</website> -->
<!-- Optional, game tag, if your mod can only run in a certain game, specify it. Otherwise, it is not necessary. -->
<!-- <game>Koikatsu Sunshine</game> -->
<!-- <game>Koikatsu</game> -->
<MaterialEditor SchemaVersion="2">
<!-- Optional English tooltip catalog stored as an XML TextAsset in an AssetBundle. -->
<!-- Example: <TooltipCatalog AssetBundle="my_shaders/shader_assets.unity3d" Asset="material_editor_tooltips"/> -->
<!--
<TooltipCatalog
AssetBundle="{{tooltip_asset_bundle_path.unity3d}}"
Asset="{{tooltip_asset_name}}" />
-->
<!-- A shader is defined by the following xml structure. -->
<!-- Example: <Shader Name="My/ShaderA" AssetBundle="my_shaders/shader_a.unity3d" Asset="asset_shader_a"> -->
<Shader
Name="{{ShaderName}}"
AssetBundle="{{asset_bundle_path.unity3d}}"
Asset="{{asset_name}}">
<!--
DisplayName controls the UI label; Name identifies the shader property
and persistence key. Tooltip is shown on hover. Declaration order
controls category and property order.
-->
<Property
Name="MainTex"
Type="Texture"
DisplayName="Main Texture"
Category="Main"
Group="Surface"
Tooltip="Primary surface texture." />
<!--
Native shader Cube property. Import accepts equirectangular PNG and Radiance RGBE HDR
panoramas up to 64 MiB. Non-2:1 sources are stretched with a log warning.
Cubemap rows expose Import, Export and Reset without 2D offset/scale.
-->
<Property
Name="EnvironmentCube"
Type="Cubemap"
DisplayName="Environment"
Category="Environment"
Tooltip="Environment reflection cubemap." />
<Property Name="Color" Type="Color" Category="Main" />
<!-- Render-state override example. -->
<Property
Name="BlendOpFA"
Type="Float"
DisplayName="Forward Add Blend Operation"
Category="Rendering"
Tooltip="Blend operation for the forward-add pass." />
<!--
Schema-2 Enum shorthand with label/value pairs. An unknown current
value is displayed, not rewritten.
-->
<Property
Name="Cull"
Type="Enum"
DisplayName="Cull Mode"
Category="Rendering"
Enums="Off,0,Front,1,Back,2" />
<!-- Vector2 preserves the hidden Z and W components and has no color picker. -->
<Property
Name="ScrollDirection"
Type="Vector"
Editor="Vector2"
VectorComponentCount="2"
DefaultValue="0,0,0,0"
DisplayName="Scroll Direction"
Category="Main"
Tooltip="Texture scroll speed on X and Y." />
<!-- Vector3 and Vector4 use the same Vector persistence family. -->
<Property Name="Direction" Type="Vector" Editor="Vector3"
VectorComponentCount="3" Category="Lighting" />
<Property Name="VectorData" Type="Vector" Editor="Vector4"
VectorComponentCount="4" Category="Vector Data" />
<!--
Category and Subcategory are optional presentation containers. Category
IDs are local to the shader; Subcategory IDs are local to their parent
Category. Hierarchy metadata is shader-local when the shared
default-property fallback is built.
-->
<Category
Id="lighting"
DisplayName="Lighting">
<Subcategory
Id="direct-light"
DisplayName="Direct Light">
<Property
Name="DirectLightColor"
Type="Color"
DisplayName="Color" />
<Property
Name="DirectLightStrength"
Type="Float"
Range="0,1"
DisplayName="Strength" />
</Subcategory>
</Category>
<Category
Id="effects"
DisplayName="Effects">
<Subcategory
Id="back-light"
DisplayName="Back Light">
<!--
Schema-2 Boolean is Float-backed and writes 0 or 1 only after an
explicit user change. It does not manipulate a shader keyword.
Invert is optional and defaults to false.
-->
<Property
Name="UseBacklight"
Type="Boolean"
DisplayName="Back Light"
Tooltip="Enable back-light shading." />
<!--
ShowIf hides this row during normal browsing when its condition is
false.
-->
<Property
Name="BacklightColor"
Type="Color"
DisplayName="Color"
ShowIf="UseBacklight != 0" />
<Property
Name="BacklightNormalStrength"
Type="Float"
Range="0,1"
DisplayName="Normal Strength" />
</Subcategory>
</Category>
<!-- Escape less-than operators in XML attributes. -->
<Property Name="LowQualityValue" Type="Float"
ShowIf="Quality <= 1" />
<!-- Schema-1 property examples. -->
<Property Name="FloatProperty" Type="Float" Range="-1,1"
DefaultValue="0" Category="Schema 1 Examples" />
<Property Name="ColorProperty" Type="Color"
DefaultValue="0,0.5,0.5,1" Category="Schema 1 Examples" />
<Property Name="TextureProperty" Type="Texture"
DefaultValueAssetBundle="shader_assets.unity3d"
DefaultValue="default_texture"
AnisoLevel="16" FilterMode="2" WrapMode="0"
Category="Schema 1 Examples" />
<Property Name="KEYWORD_NAME" Type="Keyword"
DefaultValue="True" Category="Schema 1 Examples" />
<Property Name="InternalProperty" Type="Float" Hidden="True" />
<!--
Supported condition operators: ==, !=, >, >=, <, <=.
A bare property means != 0; !Property means == 0. Sources are limited
to Float/Enum/Boolean/Keyword values on the same material.
Invalid metadata warns and falls back safely:
- Type="Boolean" and Type="Enum" are schema-2-only Float aliases;
schema 1 rejects both aliases
- unknown Editor -> editor implied by Type
- Enum without valid Enums pairs -> Float editor
- malformed condition -> accessible row
- invalid VectorComponentCount -> editor default
Category and Subcategory are optional; manifests that omit them remain
flat.
Search ignores stored Category/Subcategory collapse without modifying
it. A matching ShowIf-false property is displayed disabled together
with the blocking condition; search never writes or satisfies it.
-->
<!-- Notes -->
<!-- - "True", "TRUE", "true" are all acceptable values for boolean fields. -->
</Shader>
</MaterialEditor>
</manifest>