I'm not entirely sure what causes that but this line looks odd to me:
lightDistance = sqrt((pow(worldPosition.x - lightPosition.x, 2)) + (pow(worldPosition.y - lightPosition.y, 2)) + (pow(worldPosition.z - lightPosition.z, 2)));
Are you sure that you want to use the z-component for that? (2D)