In CG, it looks like your shader is doing this: float CSLM(float3 N, float3 L, float S){//S = simplicity//NoL because it looks like your 3vector (0,0,1) is just a normal vector.float NoL = dot(N,L);//don't know what ceiling value you've chosen.float CSLM_A = S / ceil( min, S * NoL);//i'm guessing you're clamping at 0 - 1,…