LineRenderer2D
LineRenderer2D copied to clipboard
Compilation error fix.
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);
}
Shader error in 'Game/S_BresenhamMultiLineRenderer2D': variable 'inputData' used without having been completely initialized at line 156 (on d3d11)
Not sure if this fixes it, but I used ZERO_INITIALIZE(InputData2D, inputData);
before inputData.uv = i.screenPos;
just added a new fork & pull request for anyone required to use unity 2021.3