Ported outline shading from the old prototype to C#