// 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.Shadows
{
    /// <summary>
    /// Defines the textures used for shadow mapping.
    /// </summary>
    shader ShadowMapCommon<MemberName PerLighting>
    {
        rgroup PerLighting
        {
            [Link("ShadowMap.ShadowMapTexture")]
            Texture2D ShadowMapTexture;
        }

        cbuffer PerLighting
        {
            [Link("ShadowMap.TextureSize")]
            float2 ShadowMapTextureSize;

            [Link("ShadowMap.TextureTexelSize")]
            float2 ShadowMapTextureTexelSize;
            // TODO: We could have different types (Texture2DArray for optimized paths, TextureCube for omni...etc.)
        }
    };
}
