Esempio 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");
        }
Esempio n. 2
0
 public void ValidLabel()
 {
     Assert.IsTrue(ShaderValidation.IsValidShaderLabel("SFX_PBS_1b01000008008a68_opaque"));
 }
Esempio 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"));
 }
Esempio n. 4
0
 public void MissingTag()
 {
     Assert.IsTrue(ShaderValidation.IsValidShaderLabel("SFX_PBS_1b01000008008a68"));
 }
Esempio n. 5
0
 public void InvalidLabel()
 {
     Assert.IsFalse(ShaderValidation.IsValidShaderLabel("SFX_PBS_0000000000000000_opaque"));
 }
Esempio n. 6
0
 public void InvalidTag()
 {
     Assert.IsFalse(ShaderValidation.IsValidShaderLabel("SFX_PBS_1b01000008008a68_invalid"));
 }