Пример #1
0
        private String _GetDebugWarnings()
        {
            var sb = new StringBuilder();

            if (Geometry.TryGetNormal(out Vector3 n))
            {
                if (!n.IsNormalized())
                {
                    sb.Append($" ❌𝚴:{n}");
                }
            }

            if (Geometry.TryGetTangent(out Vector4 t))
            {
                if (!t.IsValidTangent())
                {
                    sb.Append($" ❌𝚻:{t}");
                }
            }

            for (int i = 0; i < Material.MaxColors; ++i)
            {
                var c = Material.GetColor(i);
                if (!c._IsFinite() | !c.IsInRange(Vector4.Zero, Vector4.One))
                {
                    sb.Append($" ❌𝐂{i}:{c}");
                }
            }

            for (int i = 0; i < Material.MaxTextCoords; ++i)
            {
                var uv = Material.GetTexCoord(i);
                if (!uv._IsFinite())
                {
                    sb.Append($" ❌𝐔𝐕{i}:{uv}");
                }
            }

            for (int i = 0; i < Skinning.MaxBindings; ++i)
            {
                var(jidx, jwgt) = Skinning.GetBinding(i);
                if (!jwgt._IsFinite() || jwgt < 0 || jidx < 0)
                {
                    sb.Append($" ❌𝐉𝐖{i} {jidx}:{jwgt}");
                }
            }

            return(sb.ToString());
        }