// 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.Lights
{
    /// <summary>
    /// Defines a simple environment light
    /// </summary>
    shader LightSimpleAmbient : EnvironmentLight, MaterialPixelShadingStream
    {
        cbuffer PerView.Lighting
        {
            [Color]
            float3 AmbientLight;
        }

        override void PrepareEnvironmentLight()
        {
            base.PrepareEnvironmentLight();

            float3 lightColor = AmbientLight * streams.matAmbientOcclusion;
            streams.envLightDiffuseColor = lightColor;
            streams.envLightSpecularColor = lightColor;
        }
    };
}
