// 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
{
    /// <summary>
    /// Modify the alpha color based on the matDiffuseSpecularAlphaBlend alpha
    /// </summary>
    shader MaterialSurfaceTransmittanceShading : IMaterialSurfacePixel, MaterialPixelShadingStream, MaterialTransmittanceReflectanceStream
    {
        override void Compute()
        {
			// Blend mode is SRC_COLOR, ZERO
			//  Transmittance == 0 => black
			//  Transmittance == 1 => preserve color
            streams.shadingColor = lerp(1, streams.matTransmittance, streams.shadingColorAlpha);
        }
    };
}
