// 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.Skyboxes
{
    /// <summary>
    /// Sample a cubemap using the MaterialPixelShadingStream roughness parameter.
    /// </summary>
    shader LevelCubeMapEnvironmentColor : IComputeEnvironmentColor, Texturing
    {
        TextureCube CubeMap;
        float MipLevel;

        override float4 Compute(float3 direction)
        {
            return CubeMap.SampleLevel(LinearSampler, direction, MipLevel);
        }
    };
}
