Skip to content

Commit 2b21a01

Browse files
committed
enable UnityPerMaterial
1 parent fca32d9 commit 2b21a01

File tree

4 files changed

+8
-0
lines changed

4 files changed

+8
-0
lines changed

Assets/Extensions/TextMeshPro/Shaders/FairyGUI-TMP.shader

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,9 +160,11 @@ SubShader {
160160
float4 _FaceTex_ST;
161161
float4 _OutlineTex_ST;
162162

163+
CBUFFER_START(UnityPerMaterial)
163164
#ifdef CLIPPED
164165
float4 _ClipBox = float4(-2, -2, 0, 0);
165166
#endif
167+
CBUFFER_END
166168

167169
pixel_t VertShader(vertex_t input)
168170
{

Assets/Resources/Shaders/FairyGUI-BMFont.shader

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ Shader "FairyGUI/BMFont"
8181

8282
sampler2D _MainTex;
8383

84+
CBUFFER_START(UnityPerMaterial)
8485
#ifdef CLIPPED
8586
float4 _ClipBox = float4(-2, -2, 0, 0);
8687
#endif
@@ -89,6 +90,7 @@ Shader "FairyGUI/BMFont"
8990
float4 _ClipBox = float4(-2, -2, 0, 0);
9091
float4 _ClipSoftness = float4(0, 0, 0, 0);
9192
#endif
93+
CBUFFER_END
9294

9395
v2f vert (appdata_t v)
9496
{

Assets/Resources/Shaders/FairyGUI-Image.shader

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ Shader "FairyGUI/Image"
8585
sampler2D _AlphaTex;
8686
#endif
8787

88+
CBUFFER_START(UnityPerMaterial)
8889
#ifdef CLIPPED
8990
float4 _ClipBox = float4(-2, -2, 0, 0);
9091
#endif
@@ -93,6 +94,7 @@ Shader "FairyGUI/Image"
9394
float4 _ClipBox = float4(-2, -2, 0, 0);
9495
float4 _ClipSoftness = float4(0, 0, 0, 0);
9596
#endif
97+
CBUFFER_END
9698

9799
#ifdef COLOR_FILTER
98100
float4x4 _ColorMatrix;

Assets/Resources/Shaders/FairyGUI-Text.shader

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ Shader "FairyGUI/Text"
8080

8181
sampler2D _MainTex;
8282

83+
CBUFFER_START(UnityPerMaterial)
8384
#ifdef CLIPPED
8485
float4 _ClipBox = float4(-2, -2, 0, 0);
8586
#endif
@@ -88,6 +89,7 @@ Shader "FairyGUI/Text"
8889
float4 _ClipBox = float4(-2, -2, 0, 0);
8990
float4 _ClipSoftness = float4(0, 0, 0, 0);
9091
#endif
92+
CBUFFER_END
9193

9294
v2f vert (appdata_t v)
9395
{

0 commit comments

Comments
 (0)