public static TShader Compile <TShader>(this IShaderDefinition <TShader> definition)
            where TShader : IShaderBase
        {
            TShader shader;

            definition.Compile(out shader);
            return(shader);
        }
Exemple #2
0
        protected BaseShaderHandle(IShaderParameters parameters, IShaderDefinition <TShader> definition)
        {
            Transform                = parameters.Transform;
            Format                   = parameters.Format;
            SizeIndex                = parameters.SizeIndex;
            Arguments                = new ArgumentList(parameters.Arguments);
            LinearSampling           = parameters.LinearSampling;
            PerTextureLinearSampling = parameters.PerTextureLinearSampling;

            m_Definition = definition;
            Shader       = m_Definition.Compile();
        }
 public void Initialize()
 {
     Shader = m_Definition.Compile();
 }
 public void Compile(out TShader shader)
 {
     shader = m_CachedShader ?? (m_CachedShader = m_Definition.Compile());
 }