Replace depthMod with GetDepthMod in legacyCpp