public void ValidShaderLabelNoTag() { CollectionAssert.AreEqual( new List <string> { "opaque", "sort", "far", "near" }, ShaderValidation.GetRenderPasses("SFX_PBS_010002000800824f") ); }
private static Material CreateMaterial(MatlEntry entry, int index) { var idColor = UniqueColors.IndexToColor(index); var material = new Material(entry) { MaterialIdColor = new SolidColorBrush(Color.FromArgb(255, (byte)idColor.X, (byte)idColor.Y, (byte)idColor.Z)), ShaderAttributeNames = string.Join(", ", ShaderValidation.GetAttributes(entry.ShaderLabel)), ShaderParameterNames = string.Join(", ", ShaderValidation.GetParameters(entry.ShaderLabel).Select(p => p.ToString()).ToList()), RenderPasses = ShaderValidation.GetRenderPasses(entry.ShaderLabel) }; AddAttributesToMaterial(entry, material); return(material); }
public void InvalidShaderLabel() { CollectionAssert.AreEqual(new List <string>(), ShaderValidation.GetRenderPasses("SFX_PBS_0000000000000000")); }