Just did a little more testing and the last line here is wrong, instead of LightingStandard(s, normal, gi) it should actually be return LightingStandard(s, rayDir, gi) or LightingStandard(s, normalize(UnityWorldSpaceViewDir(p)), gi) but I'm not 100% sure which.