You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit restructures the shader generation process by moving the shader generation script to the editor folder and updating paths. It also removes the separate property files and integrates them directly into the shader templates.
Co-authored-by: sindharta.tanuwijaya <sindharta.tanuwijaya@unity3d.com>
Copy file name to clipboardExpand all lines: com.unity.toon-graphics-test/Editor/README_ShaderGenerator.md
+11-14Lines changed: 11 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,23 +4,18 @@ This tool helps maintain consistency between `UnityToon.shader` and `UnityToonTe
4
4
5
5
## Files
6
6
7
-
-**CommonPropertiesPart.shader**: Plain text list of shared property definitions (no Shader wrapper) with original comments preserved
8
-
-**TessellationPropertiesPart.shader**: Plain text list of tessellation-only property definitions (no Shader wrapper)
7
+
-**CommonPropertiesPart.shader**: Plain text list of shared property definitions (no Shader wrapper) with original comments preserved (`Packages/com.unity.toonshader/Runtime/Shaders/Common/Parts~/`)
8
+
-**TessellationPropertiesPart.shader**: Plain text list of tessellation-only property definitions (no Shader wrapper) (`Packages/com.unity.toonshader/Runtime/Shaders/Common/Parts~/`)
9
9
-**ShaderGenerator.cs**: Unity Editor script (now located in the graphics test package) that generates the shader files from the property assets
10
10
11
11
## How to Use
12
12
13
-
1.**Open the Shader Generator Window**:
14
-
-In Unity, go to `Unity Toon Shader > Generate Shader Files`
15
-
-This opens the Shader Generator window
13
+
1.**Edit Properties**:
14
+
-Modify the plain-text part files under `Packages/com.unity.toonshader/Runtime/Shaders/Common/Parts~/`
15
+
-The files contain only property declarations, so standard ShaderLab property syntax applies
16
16
17
-
2.**Edit Properties**:
18
-
- Click "Open Common Properties File" to edit the shared properties shader (includes all original comments)
19
-
- Click "Open Tessellation Properties File" to edit the tessellation-specific properties shader
20
-
- Make your changes directly in the shader assets
21
-
22
-
3.**Generate Shader Files**:
23
-
- Click "Generate Shader Files" button
17
+
2.**Generate Shader Files**:
18
+
- In Unity, choose `Toon Shader > Generate Shader Files`
24
19
- The tool will automatically:
25
20
- Replace the Properties blocks in both shader files
26
21
- Preserve all other shader content (HLSLINCLUDE, SubShaders, etc.)
0 commit comments