

Mask1features += template.GetMaskDisplayName(kvp.Key) + "," Var maskEnabled = template.GetMaskDependency(kvp.Key, config) Enable Masks according to their dependencies (new system using Template) Var error = " Template string is null or empty" īool mask1 = false, mask2 = false, mask3 = false, vcolors_mask = false, mainTex_mask = false If (template.textastet = null || string.IsNullOrEmpty()) Private static string GenerateShaderSource(this TCP2_Config config, TCP2_ShaderGenerator.ShaderGeneratorTemplate template, Shader existingShader = null)
#Toony colors pro maya tutorial code
Generate the source code for the shader as a string SaveShader(addPastConfig, existingShader, source, false, false) Source = addPastConfig.GenerateShaderSource(template, existingShader) ĭebug.LogError(" Can't save Terrain AddPast Shader: source is null or empty!") SaveShader(baseConfig, existingShader, source, false, false) ĪddPastConfig.Filename = addPastConfig.Filename + "_AddPast" ĪddPastConfig.ShaderName = "Hidden/" + addPastConfig.ShaderName + "-AddPast" Ī("TERRAIN_ADDPast") Source = baseConfig.GenerateShaderSource(template, existingShader) ĭebug.LogError(" Can't save Terrain Base Shader: source is null or empty!") Var shader = SaveShader(config, existingShader, source, overwritePrompt, config.isModifiedExternally) īaseConfig.Filename = baseConfig.Filename + "_Base" īaseConfig.ShaderName = "Hidden/" + baseConfig.ShaderName + "-Base" String source = config.GenerateShaderSource(template, existingShader) ĭebug.LogError(" Can't save Shader: source is null or empty!") Public static Shader Compile(TCP2_Config config, Shader existingShader, TCP2_ShaderGenerator.ShaderGeneratorTemplate template, float progress, bool overwritePrompt)ĮditorUtility.DisplayProgressBar("Hold On", "Generating Shader: " + config.ShaderName, progress) Return Compile(config, existingShader, template, showProgressBar ? 0f : -1f, overwritePrompt) Public static Shader Compile(TCP2_Config config, Shader existingShader, TCP2_ShaderGenerator.ShaderGeneratorTemplate template, bool showProgressBar = true, bool overwritePrompt = true) Var relativePath = Uri.UnescapeDataString(relativeUri.ToString()) Var relativeUri = fromUri.MakeRelativeUri(toUri) Path can't be made relative (shouldn't happen though!) Private static string MakeRelativePath( string fromPath, string toPath ) _OutputPath = EditorPrefs.GetString("TCP2_OutputPath", OUTPUT_PATH) įoreach (var c in Path.GetInvalidPathChars())įoreach (var c in Path.GetInvalidFileNameChars())ĮditorPrefs.SetString("TCP2_OutputPath", _OutputPath) Return rootPath + "/Shaders 2.0 Generated/" Var rootPath = TCP2_Utils.FindReadmePath(true)

TCP2 folder has been moved? Try to find new location Public static bool SelectGeneratedShader Private const string INCLUDE_REL_PATH = "./Shaders 2.0/Include/" Public const string OUTPUT_PATH = TCP2_PATH + "Shaders 2.0 Generated/" Private const string TCP2_PATH = "/JMO astets/Toony Colors Pro/"

Public static clast TCP2_ShaderGeneratorUtils Helper functions related to shader generation and file saving
