예제 #1
0
 public void ValidShaderLabelNoTag()
 {
     CollectionAssert.AreEqual(
         new List <string> {
         "opaque",
         "sort",
         "far",
         "near"
     },
         ShaderValidation.GetRenderPasses("SFX_PBS_010002000800824f")
         );
 }
예제 #2
0
        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);
        }
예제 #3
0
 public void InvalidShaderLabel()
 {
     CollectionAssert.AreEqual(new List <string>(), ShaderValidation.GetRenderPasses("SFX_PBS_0000000000000000"));
 }