Skip to content

Compilation error fix. #2

@johste93

Description

@johste93

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);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions