// 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.
/// <summary>
/// Samples a repeated texture with default sampler. Default sampler should be on repeat for this shader to behave correctly.
/// </summary>
/// <remarks>
/// TTexture: generic Texture2D - the texture to sample.
/// TStream: generic Semantic - the texcoord index semantic used to sample the texture.
/// TFactor: generic float - the repeat factor.
/// </remarks>
shader ComputeColorTextureRepeat<Texture2D TTexture, Semantic TStream, float TFactor> : ComputeColor
{
    stage stream float2 TexCoord : TStream;

    override float4 Compute()
    {
        return TTexture.Sample(Texturing.Sampler, streams.TexCoord * TFactor);
    }
};
