Exemplo n.º 1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ShaderMixinParser"/> class.
        /// </summary>
        public ShaderMixinParser(IVirtualFileProvider fileProvider)
        {
            SourceManager = new ShaderSourceManager(fileProvider);
            var shaderLoader = new ShaderLoader(SourceManager);

            if (shaderLibrary == null)
            {
                shaderLibrary = new XenkoShaderLibrary(shaderLoader);
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ShaderMixinParser"/> class.
        /// </summary>
        public ShaderMixinParser(IVirtualFileProvider fileProvider)
        {
            SourceManager = new ShaderSourceManager(fileProvider);
            var shaderLoader = new ShaderLoader(SourceManager);

            if (shaderLibrary == null)
            {
                shaderLibrary = new XenkoShaderLibrary(shaderLoader);
            }

            // Create the clone context with the instances of Hlsl classes
            HlslSemanticAnalysis.FillCloneContext(hlslCloneContext);
        }