Ejemplo n.º 1
0
        public override async Task CreateAssetAsync(CompiledShader obj, IServiceProvider services)
        {
            ShaderContentManager shaderContentManager = services.GetRequiredService <ShaderContentManager>();

            foreach (var shaderSource in ShaderSources)
            {
                obj.Shaders[shaderSource.Key] = (await FileIO.ReadBufferAsync(await shaderContentManager.RootFolder !.GetFileAsync(shaderSource.Value))).ToArray();
            }
        }
 public MaterialGeneratorContext(GraphicsDevice device, Material material, ShaderContentManager contentManager)
 {
     GraphicsDevice = device;
     Material       = material;
     Content        = contentManager;
 }