inline half CustomDotClamped ( half3 a, half3 b ){
#if (SHADER_TARGET < 30)
return saturate(dot(a,b));
#else
return max(0.0h, dot(a,b));
#endif
}
inline half CustomLambertTerm ( half3 normal, half3 lightDir ) {
return smoothstep(0.0,0.05f, CustomDotClamped (normal, lightDir)); //I only added 1 character but the design of this site prevents 1 character edits hence I had to also add this comment :(
}
Added extra closing ")" to code in Step 3 to fix errors. Had to also add a comment because 1 character edits are one of the many things not allowed by this site.