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"); }
public void ValidLabel() { Assert.IsTrue(ShaderValidation.IsValidShaderLabel("SFX_PBS_1b01000008008a68_opaque")); }
public void TerryShaders() { // Test DLC characters. Assert.IsTrue(ShaderValidation.IsValidShaderLabel("SFX_PBS_010000000808866b_opaque")); Assert.IsTrue(ShaderValidation.IsValidShaderLabel("SFX_PBS_0100000008018669_sort")); }
public void MissingTag() { Assert.IsTrue(ShaderValidation.IsValidShaderLabel("SFX_PBS_1b01000008008a68")); }
public void InvalidLabel() { Assert.IsFalse(ShaderValidation.IsValidShaderLabel("SFX_PBS_0000000000000000_opaque")); }
public void InvalidTag() { Assert.IsFalse(ShaderValidation.IsValidShaderLabel("SFX_PBS_1b01000008008a68_invalid")); }