@@ -33,7 +33,7 @@ struct Varyings
3333 #if defined (_FLOW_MAP_ENABLED) || defined (_FLOW_MAP_TARGET_BASE) || defined (_FLOW_MAP_TARGET_TINT) || defined (_FLOW_MAP_TARGET_EMISSION) || defined (_FLOW_MAP_TARGET_ALPHA_TRANSITION) || defined (_FADE_TRANSITION_ENABLED) || defined (_DISSOLVE_TRANSITION_ENABLED)
3434 float4 flowTransitionUVs : TEXCOORD3 ; // xy: FlowMap UV, zw: TransitionMap UV
3535 #endif
36- #if defined (_TINT_MAP_ENABLED) || defined (_TINT_MAP_3D_ENABLED)
36+ #if defined (_TINT_MAP_ENABLED) || defined (_TINT_MAP_MODE_2D_ARRAY) || defined ( _TINT_MAP_3D_ENABLED)
3737 float2 tintUV : TEXCOORD4 ; // xy: TintMap UV, zw: EmissionMap UV
3838 #endif
3939 float transitionProgress : TEXCOORD5 ;
@@ -129,16 +129,17 @@ Varyings ShadowPassVertex(Attributes input)
129129 #endif
130130
131131 // Tint Map UV
132- #if defined (_TINT_MAP_ENABLED) || defined (_TINT_MAP_3D_ENABLED)
132+ #if defined (_TINT_MAP_ENABLED) || defined (_TINT_MAP_MODE_2D_ARRAY) || defined ( _TINT_MAP_3D_ENABLED)
133133 output.tintUV = TRANSFORM_TINT_MAP (input.texcoord.xy);
134134 output.tintUV.x += GET_CUSTOM_COORD (_TintMapOffsetXCoord);
135135 output.tintUV.y += GET_CUSTOM_COORD (_TintMapOffsetYCoord);
136136 #endif
137137
138138 // Tint Map Progress
139- #ifdef _TINT_MAP_3D_ENABLED
140- output.baseMapUVAndProgresses.w = _TintMap3DProgress + GET_CUSTOM_COORD (_TintMap3DProgressCoord);
141- output.baseMapUVAndProgresses.w = TintMapProgress (output.baseMapUVAndProgresses.w);
139+ #ifdef _TINT_MAP_MODE_2D_ARRAY
140+ output.baseMapUVAndProgresses.w = FlipBookProgress (_TintMapProgress + GET_CUSTOM_COORD (_TintMapProgressCoord), _TintMapSliceCount);
141+ #elif _TINT_MAP_3D_ENABLED
142+ output.baseMapUVAndProgresses.w = FlipBookBlendingProgress (_TintMap3DProgress + GET_CUSTOM_COORD (_TintMap3DProgressCoord), _TintMapSliceCount);
142143 #endif
143144
144145 // Flow Map UV
@@ -203,7 +204,7 @@ half4 ShadowPassFragment(Varyings input) : SV_TARGET
203204 #endif
204205
205206 #ifdef _FLOW_MAP_TARGET_TINT
206- #if defined (_TINT_MAP_ENABLED) || defined (_TINT_MAP_3D_ENABLED)
207+ #if defined (_TINT_MAP_ENABLED) || defined (_TINT_MAP_MODE_2D_ARRAY) || defined ( _TINT_MAP_3D_ENABLED)
207208 input.tintUV += flowMapUvOffset;
208209 #endif
209210 #endif
@@ -224,7 +225,7 @@ half4 ShadowPassFragment(Varyings input) : SV_TARGET
224225 if (_ShadowCasterAlphaAffectedByTintColor)
225226 {
226227 half tintBlendRate = _TintBlendRate + GET_CUSTOM_COORD (_TintBlendRateCoord);
227- #if defined (_TINT_MAP_ENABLED) || defined (_TINT_MAP_3D_ENABLED)
228+ #if defined (_TINT_MAP_ENABLED) || defined (_TINT_MAP_MODE_2D_ARRAY) || defined ( _TINT_MAP_3D_ENABLED)
228229 ApplyTintColor (color, input.tintUV, input.baseMapUVAndProgresses.w, tintBlendRate);
229230 #else
230231 ApplyTintColor (color, half2 ( 0 , 0 ), input.baseMapUVAndProgresses.w, tintBlendRate);
0 commit comments