public static void DumpDebugTextures(NetInfo info) { Material material = info.m_nodes[0].m_nodeMaterial; DumpUtils.Dump(material, ID_APRMap, baseName: "node-original ", info); Material material2 = info.m_segments[0].m_segmentMaterial; DumpUtils.Dump(material2, ID_APRMap, baseName: "segment-original", info); var tex = material2.GetTexture(ID_APRMap); if (info.isAsym()) { tex = Process(tex, Mirror); } float ratio = info.ScaleRatio(); if (ratio != 1f) { Texture2D ScaleRatio(Texture2D t) => Scale(t, ratio); tex = Process(tex, ScaleRatio); } string s = ratio == 1 ? "segment-mirrored" : "segment-mirrored-scaled"; string path = DumpUtils.GetFilePath(ID_APRMap, s, info); DumpUtils.Dump(tex, path); material = PrefabUtils.HideCrossing(material, info); DumpUtils.Dump(material, ID_APRMap, baseName: "node-processed ", info); }
public static Material CalculateMaterial(Material material, ushort nodeID, ushort segmentID) { if (ShouldHideCrossing(nodeID, segmentID)) { material = PrefabUtils.HideCrossing(material, segmentID.ToSegment().Info); } return material; }