コード例 #1
0
 public void InvalidShaderLabel()
 {
     CollectionAssert.AreEqual(new List <string>
     {
         "Position0",
         "Normal0",
         "Tangent0",
     },
                               ShaderValidation.GetAttributes("SFX_PBS_0000000000000000"));
 }
コード例 #2
0
ファイル: GetAttributes.cs プロジェクト: ssbucarlos/SSBHLib
 public void ValidShaderLabel()
 {
     CollectionAssert.AreEqual(
         new List <string> {
         "colorSet2",
         "map1",
     },
         ShaderValidation.GetAttributes("SFX_PBS_1b01000008008a68_opaque")
         );
 }
コード例 #3
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);
        }
コード例 #4
0
ファイル: RMaterial.cs プロジェクト: KillzXGaming/SSBHLib
        public RMaterial(string materialLabel, string shaderLabel, int index)
        {
            MaterialLabel      = materialLabel;
            ShaderLabel        = shaderLabel;
            Index              = index;
            IsValidShaderLabel = ShaderValidation.IsValidShaderLabel(ShaderLabel);

            // This is faster than accessing the database multiple times.
            var attributes = ShaderValidation.GetAttributes(ShaderLabel);

            HasColorSet1 = attributes.Contains("colorSet1");
            HasColorSet2 = attributes.Contains("colorSet2");
            HasColorSet3 = attributes.Contains("colorSet3");
            HasColorSet4 = attributes.Contains("colorSet4");
            HasColorSet5 = attributes.Contains("colorSet5");
            HasColorSet6 = attributes.Contains("colorSet6");
            HasColorSet7 = attributes.Contains("colorSet7");
        }
コード例 #5
0
ファイル: GetAttributes.cs プロジェクト: ssbucarlos/SSBHLib
 public void InvalidShaderLabel()
 {
     CollectionAssert.AreEqual(new List <string>(), ShaderValidation.GetAttributes("SFX_PBS_0000000000000000"));
 }