Exemplo n.º 1
0
        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");
        }
Exemplo n.º 2
0
 public void ValidLabel()
 {
     Assert.IsTrue(ShaderValidation.IsValidShaderLabel("SFX_PBS_1b01000008008a68_opaque"));
 }
Exemplo n.º 3
0
 public void TerryShaders()
 {
     // Test DLC characters.
     Assert.IsTrue(ShaderValidation.IsValidShaderLabel("SFX_PBS_010000000808866b_opaque"));
     Assert.IsTrue(ShaderValidation.IsValidShaderLabel("SFX_PBS_0100000008018669_sort"));
 }
Exemplo n.º 4
0
 public void MissingTag()
 {
     Assert.IsTrue(ShaderValidation.IsValidShaderLabel("SFX_PBS_1b01000008008a68"));
 }
Exemplo n.º 5
0
 public void InvalidLabel()
 {
     Assert.IsFalse(ShaderValidation.IsValidShaderLabel("SFX_PBS_0000000000000000_opaque"));
 }
Exemplo n.º 6
0
 public void InvalidTag()
 {
     Assert.IsFalse(ShaderValidation.IsValidShaderLabel("SFX_PBS_1b01000008008a68_invalid"));
 }