using System;
using System.Collections.Generic;
using System.IO;
using System.Reflection;
using System.Text;
using UnityEngine;
using UnityEditor;
using System.Linq;
using System.Collections.ObjectModel;
using System.Text.RegularExpressions;
namespace UnityEditor.TerrainTools
{
///
/// Struct defining the description for a NoiseShaderGenerator
///
internal struct ShaderGeneratorDescriptor
{
///
/// The name of the NoiseShaderGenerator
///
public string name;
///
/// The Shader Category for Shaders generated by the NoiseShaderGenerator
///
public string shaderCategory;
///
/// The path specifying where the Shaders generated by the NoiseShaderGenerator
/// should be written to disk
///
public string outputDir;
///
/// The path to the ".noisehlsltemplate" file to be used in the NoiseShaderGenerator's
/// Shader generation.
///
public string templatePath;
}
///
/// Interface for NoiseShaderGenerator. Do not implement this directly. Inherit from the
/// NoiseShaderGenerator< T > generic abstract class, instead.
///
internal interface INoiseShaderGenerator
{
///
/// Returns a description for the NoiseShaderGenerator implementation
///
ShaderGeneratorDescriptor GetDescription();
}
///
/// Singleton base class for a NoiseShaderGenerator implementation. Inherit from this if you want
/// your shaders to get generated
///
internal abstract class NoiseShaderGenerator : ScriptableSingleton, INoiseShaderGenerator where T : NoiseShaderGenerator
{
///
/// Returns a description for the NoiseShaderGenerator implementation
///
public abstract ShaderGeneratorDescriptor GetDescription();
}
}