To make this work in Unity 2021.3 I had to replace all instances of
if (_IsUnlit == 0.0f)
{
// Lighting
finalColor = CombinedShapeLightShared(finalColor, maskColor, i.screenPos);
}
with:
if (_IsUnlit == 0.0f)
{
// Lighting
SurfaceData2D surfaceData;
InputData2D inputData;
surfaceData.albedo = finalColor.rgb;
surfaceData.alpha = 1;
surfaceData.mask = maskColor;
inputData.uv = i.screenPos;
finalColor = half4(CombinedShapeLightShared(surfaceData, inputData).rgb, finalColor.a);
}
To make this work in Unity 2021.3 I had to replace all instances of
with: