// 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
{
    class MaterialCelShadingLightDefault<bool IsBlackAndWhite> : IMaterialCelShadingLightFunction
    {
        override float3 Compute(float lightIn)
        {
            if (IsBlackAndWhite)
            {
				if (lightIn > 0.2)
					return float3(1, 1, 1);                
            }
            else
            {
				if (lightIn > 0.8)
					return float3(1, 1, 1);

				if (lightIn > 0.5)
					return float3(0.8f, 0.8f, 0.8f);

				if (lightIn > 0.2)
					return float3(0.3f, 0.3f, 0.3f);                
            }

            return 0;
        }
    };
}
