// Copyright (c) .NET Foundation and Contributors (https://dotnetfoundation.org/ & https://stride3d.net) and Silicon Studio Corp. (https://www.siliconstudio.co.jp)
// Distributed under the MIT license. See the LICENSE.md file in the project root for more information.
namespace Stride.Rendering.Materials
{
    shader MaterialSurfaceStreamsBlend : IMaterialSurface
    {
        compose IMaterialSurface layer;

        compose IMaterialStreamBlend blends[];

        override void Compute()
        {
            var backup = streams;

            // Compute the layer
            layer.Compute();

            // Compute the blending of this layer
            foreach(var blendStep in blends)
            {
                blendStep.Compute(backup);
            }
        }
    };
}
